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

Answer Posted / vignesh1988i

the printf and sprintf functions are used to output to the
screen.....
in printf... just we can print the necessary things as
we wanted
SYNTX is:: printf("format specifiers..(%d or %c
etc)",list of agruments..(arg1,arg2... arg n);
hrewr this function directly output whatever you are giving
inside ....
but sprintf is called Stream printf... where it will store
whatever we output to the screen in an array (ie..stream)
and then output to the screen;;;

sprintf(array base address,"format specifications",variables);

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a sequential access file?

740


What does sizeof function do?

727


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5188


Are there constructors in c?

696


What are types of functions?

663






Write a program for Overriding.

811


What does. int *x[](); means ?

720


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

1709


What is static volatile in c?

661


What does %d do?

841


Is it valid to address one element beyond the end of an array?

789


List some of the dynamic data structures in C?

896


Why should I use standard library functions instead of writing my own?

800


What is operator promotion?

719


In which language linux is written?

744