These are built-in types that the C++ compiler implicitly understands. Some of the built-in types are -

  1. Booleans
  2. Characters
  3. Integers
  4. Single Precision Floats
  5. Double Precision Floats
  6. Void

Void Variables

No variable can be of type void; it is primarily used to indicate a function returning nothing. A void * can point to any variable, and needs to be cast to another type before being dereferenced.

These fundamental types can further be modified using type specifiers. These set the size and the values allowed to be stored in these types.

  1. short
  2. long
  3. unsigned
  4. signed

Integer Overflow

Overflow behavior is well defined for unsigned integers (equivalent to the modulo operator or wrap around), but that’s not the case for signed integers. Also, conversion from unsigned to signed integers is well defined. The reverse is true from C++20.