GNU Info

Info Node: (libc.info)Variadic Functions

(libc.info)Variadic Functions


Next: Null Pointer Constant Prev: Consistency Checking Up: Language Features
Enter node , (file) or (file)node

Variadic Functions
==================

   ISO C defines a syntax for declaring a function to take a variable
number or type of arguments.  (Such functions are referred to as
"varargs functions" or "variadic functions".)  However, the language
itself provides no mechanism for such functions to access their
non-required arguments; instead, you use the variable arguments macros
defined in `stdarg.h'.

   This section describes how to declare variadic functions, how to
write them, and how to call them properly.

   *Compatibility Note:* Many older C dialects provide a similar, but
incompatible, mechanism for defining functions with variable numbers of
arguments, using `varargs.h'.

Why Variadic
Reasons for making functions take
variable arguments.
How Variadic
How to define and call variadic functions.
Variadic Example
A complete example.

automatically generated by info2www version 1.2.2.9