...

/

Use of Variable Argument Lists

Use of Variable Argument Lists

Study the applications of variable argument lists.

We'll cover the following...

You can pass a variable number of arguments to functions, like printf( ) and scanf( ). We can also write functions that receive different numbers of arguments in different calls.

Example program

Here, we propose to write a function call, findmax( ), that finds the maximum out of the numbers passed to it. To do this, we need to use three macros: va_start, ...

Access this course and 1400+ top-rated courses and projects.