In the old days, a common source of bugs in C was from argument type mismatches between a function call and the function definition. For example, passing a
double when you call the function but the function itself expected an
int. The introduction of
function prototypes with ANSI C in 1989 made that kind of bug much less common -- to the point where it may not occur to you to even look for it. However it can still occur.
For example, the function prototype for
printf is:
- int printf(const char *fmt, …);
Dot-dot-dot tells the compiler to allow any number of parameters to follow and to allow them to be of any type. Dot-dot-dot is why the compiler doesn't notice when you pass an argument to
printf that is not compatible with the format string.
Dot-dot-dot is a time machine that takes you back to 1975.