The conversion characters for scanf are not identical to those for printf and
it is much more important to be precise and totally correct with these than
it is with printf.
d denary integer (int or long int)
ld long decimal integer
x hexadecimal integer
o octal integer
h short integer
f float type
lf long float or double
e float type
le double
c single character
s character string
The difference between short integer and long integer can make or break
a program. If it is found that a program’s input seems to be behaving
strangely, check these carefully. (See the section on Errors and Debugging
for more about this.)