How to type a string without using printf function?

Showing Answers 1 - 8 of 8 Answers

shobhit shrivastava

  • Jul 16th, 2006
 

//printing a string without printf#includeint main(){ char *str="shobhit"; while((*str)!=NULL) { putchar(*str); str++; } return 0;}

  Was this answer useful?  Yes

supriya ahire

  • Jul 25th, 2006
 

 

   simple , use unformatted o/p function : puts.

   syntax is,

     puts(stringname);

Thanks & regards,

Ms.Supriya Ahire.

 

  Was this answer useful?  Yes

usha

  • Aug 4th, 2006
 

cool yeah i thought of putchar() till NULL is reached

  Was this answer useful?  Yes

shaanxxx

  • Aug 20th, 2006
 

use write system call
write (1 , "XXXXXXXXXXXXXXX" , strlen("XXXXXXXXXXXXXXX" ));

  Was this answer useful?  Yes

jintojos

  • Jun 16th, 2008
 

Using Video Memory We can write a string into the screen.....that is the string is directly placed into the Video memory...ExampleVideo Memory Address : 0xb0008000 pgm: void main() { int i=0; char str[10]="Video Mem"; char far *scr=(char far*)0xb0008000; while(str+i) *(scr+i)=str[i++]; }

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions