vscanf and friends are provided so that you can
define your own variadic
scanf-like functions that make use of
the same internals as the built-in formatted output functions.
These functions are analogous to the
vprintf series of output
functions. See section Variable Arguments Output Functions, for important
information on how to use them.
Portability Note: The functions listed in this section are GNU extensions.
scanfexcept that, instead of taking a variable number of arguments directly, it takes an argument list pointer ap of type
va_list(see section Variadic Functions).
fscanfwith the variable argument list specified directly as for
sscanfwith the variable argument list specified directly as for
In GNU C, there is a special construct you can use to let the compiler
know that a function uses a
scanf-style format string. Then it
can check the number and types of arguments in each call to the
function, and warn you when they do not match the format string.
See section `Declaring Attributes of Functions' in Using GNU CC, for details.
Go to the first, previous, next, last section, table of contents.