Allows a reference to the argument following the argument currently being referred to in the function with variable arguments.
type va_arg (va_list ap, type);
ap Variable for accessing variable arguments
type Type of arguments to be accessed
Specify a variable of the va_list type initialized by the va_start macro as the first argument. The value of ap is updated each time va_arg is used, and, as a result, a sequence of variable arguments is returned by sequential calls of this macro.
Specify the type to refer to as the second argument type.
The ap argument must be the same as the ap initialized by va_start.
It will not be possible to refer to arguments correctly if argument type is set to a type of which size is changed by type conversion when it is used as a function argument, i.e., if char type, unsigned char type, short type, unsigned short type, or float type is specified as type. If such a type is specified, correct operation is not guaranteed.