Standard Input
Function scanf in library <stdio.h> reads from the standard input device and deciphers the input characters according to the format string given as the first argument of a call.
The remaining arguments of a call to scanf are pointers to variables where the input values should be stored.
As with printf, C compilers generally can�t (or don�t) check that the types of the variables match the format codes in the format string.
A mismatch, usually a mistake, can lead to mysteriously scrambled bytes in memory or a program or machine crash.