Va_list
va_list is a C and C++ type representing the state of traversal through a variable argument list.
Modern C, Third Edition
va_list is the C library type used to represent the state of traversal through a variable argument list.
- How it is used
- Supports traversing or forwarding the hidden arguments of C variadic functions.
- How deep it goes
- Defines the lifecycle and four operations but stops short of specifying va_list's representation or ABI details.
- Examples
- Demonstrates forwarding a va_list to vfprintf and summing a sequence of double values.
- What you can do after
- Apply it via <stdarg.h> to traverse variable arguments or forward them to a v-prefixed library function.
Modern C
va_list is the C standard library type used to represent the state of traversal through a variable argument list.
- How it is used
- Supports implementing or forwarding C variadic functions through stdarg.h.
- How deep it goes
- Explains initialization, typed extraction, copying, and cleanup, but defers representation and calling-convention internals.
- Examples
- Uses a printf_debug wrapper and a sumIt function that accumulates n double values.
- What you can do after
- Operate stdarg.h and vfprintf to forward or traverse variable arguments with explicit extraction types.
What to know first
- arithmetic typeAn arithmetic type is a C type representing integer, floating-point, or complex numeric values.
Related concepts
- va_argused by · va_arg is a C and C++ macro that retrieves the next argument from a variable argument list as a specified type.
- stdarg.hused by · stdarg.h is the C standard header that declares the types and macros for processing variable argument lists.
- variadic argumentsused by · A variadic parameter is a function parameter form that allows a call to supply a variable number of arguments.
Questions about va_list
What is va_list?
va_list is a C and C++ type representing the state of traversal through a variable argument list.
Which Manning books explain va_list?
Modern C, Third Edition and Modern C.
What should I know before learning va_list?
Manning books that teach va_list usually introduce arithmetic type first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

