Scans input from the stdin stream.
#include <stdio.h> int scanf ( const char *format, ... );
(IN) Points to the format control string. See Scan Format Control Strings.
(IN) Points to where the converted string is to be stored. The number of arguments is determined by the format string.
If successful, returns the number of input arguments for which values were successfully scanned and stored. Otherwise, returns EOF when any of the following occur:
The scanning is terminated by reaching the end of the input stream
A matching failure is encountered
A read error occurs
If a read error occurs, scanf also sets the error indicator for the stream and sets errno to one of the following: