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

Answer Posted / praveen

printf writes the data to console
sprintf writes the data to an array

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is code reusability in c++?

664


Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

954


What is the object serialization?

618


What do nonglobal variables default to a) auto b) register c) static

642


What is an orthogonal base class in c++?

650






What's the best free c++ profiler for windows?

618


Can we inherit constructor in c++?

584


What is vector string in c++?

570


Write a C++ Program to check whether a number is prime number or not?

627


What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00

632


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

584


Explain the difference between new() and malloc() in c++?

621


Why is it necessary to use a reference in the argument to the copy constructor?

629


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

630


What does scope resolution operator do?

590