Section 4.12 Summary
Here is what we have learned in this chapter:
- Integer numbers can be stored efficiently in the
int
datatype, characters in thechar
datatype and floating point numbers in thefloat
datatype. - The format specifiers for these datatypes are
%d
,%c
and%f
. - To read user input into these datatypes, use:
scanf("%d", &age); scanf("%c", &letter); scanf("%f", &height);