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
What is a sequential access file?
What does sizeof function do?
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
Are there constructors in c?
What are types of functions?
Write a program for Overriding.
What does. int *x[](); means ?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is static volatile in c?
What does %d do?
Is it valid to address one element beyond the end of an array?
List some of the dynamic data structures in C?
Why should I use standard library functions instead of writing my own?
What is operator promotion?
In which language linux is written?