scanf:read from stdin and stores them according to the parameter format into the locations pointed by the additional arguments.
whitespace character: scanf will ignore any whitespace(including blank space, newline, and tab characters) which are encountered before the next non-whitespace character;
format specifiers: 一个由百分号%起始的字符串表示一个format specifier, 用来明确从stdin读取的数据的类型。它的一般形式为: %[*][width][modifier]type
*:indicate that the data is to be retrieved from stdin but ignored;
width:specify the maximum number of characters to be read in the current reading operation.
modifier: specify a size different from int(d,i,n),unsigned int(o,u,x),float(e,f,g)
h: short int(d,i,n) unsigned short(for o u x)
l:long int( d ,i ,n ) unsigned long int(o u x) double(e f g)
L: long double(e,f ,g)
type: a character used to specify the type of the data to be read.
c:single character
d: decimal integer
e E f g G: floating point
o: octal integer
s:string of characters(read subsequent characters until a whitespace is found)
u: unsigned decimal integer
x,X: hexadecimal integer
e.g. scanf("%s",str);
scanf("%d",&i);
scanf("%d %d",&i,&j);