cppreference.com > C/C++ Data Types
C/C++ Data TypesThere are five data types for C: void, int, float, double, and char.
C++ defines two more: bool and wchar_t.
Type ModifiersSeveral of these types can be modified using signed, unsigned, short, and long. When one of these type modifiers is used by itself, a data type of int is assumed. A complete list of possible data types follows:
Type Sizes and RangesThe size and range of any data type is compiler and architecture dependent. The "cfloat" (or "float.h") header file often defines minimum and maximum values for the various data types. You can use the sizeof operator to determine the size of any data type, in bytes. However, many architectures implement data types of a standard size. ints and floats are often 32-bit, chars 8-bit, and doubles are usually 64-bit. bools are often implemented as 8-bit data types. |