| | | | | |

Native Data Types

  • Signed integer types: signed char, short, int, long
  • Unsigned integer types: unsigned char, unsigned short, unsigned int, unsigned long
  • Floating point types: float, double, long double
  • Special type: bool (has values true and false)
  • Sizes for the various types are implementation dependent, with some constraints
  • Size of char is typically one byte
  • Sizes must be non-decreasing as you read from left to right in these lists
  • See example program using sizeof(type-name)in narrative

| | Top of Page | 1. Basic C++: A Review - 2 of 21