LSI Interview Question

how do u pass Variable number of arguments in C?

Interview Answer

Anonymous

Jul 31, 2012

The secret to passing variable number and type of arguments is the stdarg library. It provides the va_list data-type, which can contain the list of arguments passed into a function. The stdarg library also provides several macros : var_arg, va_start, and va_end that are useful for manipulating the argument-list.

2