Friday 29 August 2014

Print Without Printf in C

Write a program in C to print a line of text on screen without using printf or other input output functions:-

int main(){
int i;
char far *ptr=(char *)0XB8000000;
*ptr='A';
*(ptr+1)=1;
*(ptr+2)='B';
*(ptr+3)=2;
*(ptr+4)='C';
*(ptr+5)=4;


return 0;
}
Output:

No comments:

Post a Comment

Tell Us What You've Got...