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

Can you declare an array without a size in c++?

781


What is private, public and protected inheritance?

822


What is the use of default constructor?

812


What is meant by entry controlled loop? What all C++ loops are exit controlled?

834


What is cin clear () in c++?

861


Distinguish between a # include and #define.

863


What is difference between c++ 11 and c++ 14?

777


What does asterisk mean in c++?

829


How can you say that a template is better than a base class?

793


What are the steps in the development cycle?

814


Difference between strdup and strcpy?

882


What is buffer and example?

711


Write a program to concatenate two strings.

789


what is pre-processor in C++?

818


what are the iterator and generic algorithms.

1900