ABy Admin
May 13'24

Exercise

  1. List at least three data types in C
    1. On your computer, how much memory does each require?
    2. Which ones can be used in place of another? Why?
      1. Are there any limitations on these uses?
      2. If so, what are they?
      3. Is it necessary to do anything special to use the alternative?
  2. Can the name we use for a data type (e.g. 'int', 'float') be used as a variable?
ABy Admin
May 13'24
  • 3 data types : long int, short int,float.
  • On my computer :
    • long int : 4 bytes
    • short int : 2 bytes
    • float : 4 bytes
  • we can not use 'int' or 'float' as a variable's name.

References

Wikibooks contributors. "C Programming/Exercise solutions". Wikibooks. Wikibooks. Retrieved 13 May 2024.

00