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

How is static data member similar to a global variable?

586


What character terminates all character array strings a) b) . c) END

674


What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero

639


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

608


What is called array?

624






Will c++ be replaced?

554


What is abstract class in c++?

592


What jobs can you get with a c++ certification?

586


Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h

660


What is a class template?

591


How the keyword struct is different from the keyword class in c++?

587


Why do we use constructor?

605


Out of fgets() and gets() which function is safe to use?

643


What is iterator in c++?

619


What is the best ide for c++?

576