what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ??

Answer Posted / manoj

i agree with Vignesh, and one more thing i would like to
add is,

ex:
char b[100];
sprintf( b, "Formatted data: %d / %f", i, f );


In above program, in array b string "Formatted data: %d / %
f" with proper i and f value will be stored.
it will not be printed on the output screen.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why c language?

642


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

1704


What is the meaning of c in c language?

592


What are linked lists in c?

647


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1259






in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7387


What is your stream meaning?

603


what is the structure pointer?

1642


Explain how do you sort filenames in a directory?

600


How do you print an address?

740


What is c preprocessor mean?

785


Here is a neat trick for checking whether two strings are equal

562


What are pointers in C? Give an example where to illustrate their significance.

746


What is difference between stdio h and conio h?

880


Tell me when would you use a pointer to a function?

603