Explain working of printf?

Answer Posted / kishore

Printf is a Variadic function. Variadic functions are
functions which may take a variable number of arguments and
are declared with an ellipsis in place of the last
parameter.
int printf(char *, ...);
Uses Var_args to know the variables in the ...
In C these are defined in stdarg.h
Refer to this link http://en.wikipedia.org/wiki/Stdarg.h

Is This Answer Correct ?    24 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation in c++ with example?

667


Why is null pointer used?

787


What is the difference between structures and unions?

677


How is c++ used in the real world?

665


What is a block in c++?

647






Declare a class vehicle and make it an abstract data type.

625


What are literals in C++?

676


What is c++ array?

636


write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;

1612


What is a vector c++?

670


How would you differentiate between a pre and post increment operators while overloading?

738


How many keywords are used in c++?

659


Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c

913


What is long in c++?

837


Is c++ a low level language?

605