Performs formatted input from the standard input (stdin), interpreting it according to the format specification. See Chapter 2 for information on format specifiers.
#include <stdio.h> int scanf (const char *format_spec, . . . );
If no conversion specifications are given, you can omit these input pointers. Otherwise, the function call must have at least as many input pointers as there are conversion specifications, and the conversion specifications must match the types of the input pointers.
Conversion specifications are matched to input sources in left-to- right order. Excess input pointers, if any, are ignored.
x | The number of successfully matched and assigned input items. |
EOF | Indicates that a read error occurred prior to any successful conversions.The function sets errno. For a list of errno values set by this function, see fscanf in this section. |