I understood it except for the last statement.
the conversion specifier "%d" skips optional leading whitespace and (tries to) converts the rest of the input to integer (if no errors occur).
I understood the point regarding the optional whitespace. But what does "converts the rest of the input to integer" means? I mean why will it convert the input to integer if the input itself is an integer?