What is the Difference between "printf" and "sprintf"?

Answer Posted / nelson

The only difference between sprintf() and printf() is that
sprintf() writes data into a character array, while printf
() writes data to standard output device.

Is This Answer Correct ?    118 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if a pointer is deleted twice?

1013


If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

1080


What is pointer -to-members in C++? Give their syntax?

785


What do you mean by const correctness?

824


What you know about structures in C++?

799


Why is polymorphism useful?

793


Will c++ be replaced?

815


Explain the purpose of the keyword volatile.

837


Who calls main function?

796


How can a called function determine the number of arguments that have been passed to it?

876


Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

804


What is the best c++ compiler?

780


What are the three forms of cin.get() and what are their differences?

830


What is the use of "new" operator?

875


What are c++ redistributables?

774