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

Answer Posted / namitha

printf is used to write the data in its format.
sprintf is used to write formatted data to string.

Is This Answer Correct ?    21 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are vectors used for in c++?

609


Where the memory to the static variables is allocated?

547


Do you need a main function in c++?

543


Is it possible to provide special behavior for one instance of a template but not for other instances?

614


declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

1733






How does java differ from c and c++?

528


Are strings mutable in c++?

681


What is #include iostream h in c++?

596


What is purpose of new operator?

587


How does a C++ structure differ from a C++ class?

606


Explain polymorphism?

571


Does there exist any other function which can be used to convert an integer or a float to a string?

641


What is #include ctype h in c++?

653


Define the process of handling in case of destructor failure?

562


Is swift faster than c++?

550