== == What is printf in c or prototype of printf with example
(q) What is prototype of printf function ? Explain each term.
Ans: Prototype of printf function is :
int printf( const char *format ,…)
Explanation of each term :
Parameter of printf function is :
(three continuous dots) : It is called ellipsis. It indicates the variable number of
arguments.
Example of ellipsis:
#include
void ellipsis(int a,...);
void main()
{
int a=5,b=10;
clrscr();
ellipsis(a,b);
getch();
}
void ellipsis(int a,...)
{
printf("%d ",a);
}
Output:5
So printf function can have any number of variables as an argument.
Copyright © 2026 eLLeNow.com All Rights Reserved.