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
What is std :: endl?
what are the iterator and generic algorithms.
What is namespace std; and what is consists of?
Can we sort map in c++?
What is the difference between struct and class?
What is name hiding in c++?
What is null and void pointer?
How new/delete differs from malloc()/free?
What is the difference between a type-specific template friend class and a general template friend class?
Can we delete this pointer in c++?
Explain what data encapsulation is in c++?
Discussion on error handling of C++ .
What is the use of function pointer?
Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort
Keyword mean in declaration?