What is the Difference between "printf" and "sprintf"?
Answer Posted / guest
prinf will print the data on to the screen.
sprintf will print the data to a buffer.
basically sprintf is used for formatting the output.
printf("%s",google);
char *p;
sprintf(p,"%s",google);
| Is This Answer Correct ? | 91 Yes | 18 No |
Post New Answer View All Answers
How java is different from c and c++?
Explain the use of vtable.
What is c++ good for?
How long it will take to learn c++?
What are the main features of c++?
What will happen if a pointer is deleted twice?
How should a contructor handle a failure?
Explain terminate() and unexpected() function?
Is atoi safe?
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
Why is main function important?
What is rvalue?
What are the various access specifiers in c++?
What is the use of 'this' pointer?
What are vectors used for in c++?