LSI Interview Question: how do u pass Variable number... | Glassdoor

Interview Question

Firmware Engineer Interview Atlanta, GA

how do u pass Variable number of arguments in C?


Interview Answer

1 Answer


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.

mahesh on Jul 31, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.