Skip to main content
Logo image

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 the char datatype and floating point numbers in the float 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);