I was going through the stdio.h header file that comes with MinGW and noticed that the printf function is declared like this:
int printf (const char *__format, ...)
{
//body omitted
}
I have never seen ellipsis in function parameter list before so I tried it out. It compiles and runs without error. What, then, is the purpose of “…”?
That means that the function is a variadic function that takes a variable number of parameters:
http://en.wikipedia.org/wiki/Variadic_function
printf()itself is probably the best example of a variadic function.