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
Is using exit() the same as using return?
What is main () in c?
How can I use a preprocessorif expression to ?
Explain what is the most efficient way to store flag values?
Why clrscr is used after variable declaration?
How can I send mail from within a c program?
p*=(++q)++*--p when p=q=1 while(q<=6)
What does double pointer mean in c?
What is d'n in c?
What are the differences between Structures and Arrays?
In which header file is the null macro defined?
Differentiate between the expression “++a” and “a++”?
What is c token?
Explain how do you declare an array that will hold more than 64kb of data?
Explain what is the difference between #include and #include 'file' ?