Facilities for defining functions that accept a variable number of arguments.
The stdarg.h header file allows the creation of functions that accept a variable number of arguments. A variable-length argument function is defined with an ellipsis (...) as its last argument. For example:
int funnyfunc(int a, char c, ...);
The function uses the va_list type and the macros va_start(), va_arg (), and va_end(). The function uses a variable of type va_list to hold the list of function arguments. The macro va_start() initializes the va_list variable. Invoke this macro before accessing the function's arguments. The macro va_arg() retrieves each of the arguments in the argument list. Finally, use va_end to allow a normal return from the function.