Variable Arguments
An under-used but very powerful feature
printf() is an example where the number and types of arguments can differ from invocation to invocation
/usr/include/stdarg.h provides definitions of:
- a special type named va_list
- three macros to implement variable arguments:
Another useful function is “vfprintf”, as shown in the next slide