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
Should I learn c before c++?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
What is wrong with this code?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
When we use void main and int main?
Define VARIABLE?
What is n in c?
What is a scope resolution operator in c?
What is volatile c?
Explain what standard functions are available to manipulate strings?
What is new line escape sequence?
What do you mean by command line argument?
What extern c means?
I have seen function declarations that look like this
What is function prototype in c language?