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

Answer Posted / lavanya

printf funtion is to write the output to stdout.
sprintf function is to store romatted input output on a
string buffer

Is This Answer Correct ?    11 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is null pointer and void pointer?

841


Difference between overloaded functions and overridden functions

841


Which is the best c++ compiler?

803


What does new do in c++?

836


Explain the pure virtual functions?

867


Can we use clrscr in c++?

847


How is modularity introduced in C++?

974


What is the advantage of c++ over c?

775


Difference between strdup and strcpy?

905


Define a nested class.

850


What is data binding in c++?

726


Write bites in Turbo c++ Header ("Include") Files.

963


How many namespaces are there in c++?

792


How can you differentiate between inheritance and implementation in c++?

929


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

1966