- Data types
- Built in data type
- Integral
- int
- char
- Void
- Floating type
- float
- double
- Integral
- User defined data type
- structure
- union
- classes
- enumeration
- Derived data type
- array
- function
- pointer
- reference
- Built in data type
Size and range of data types in C++
Type | Range | Size |
short int | 2 | -32768 to 32767 |
int | 2 | -32768 to 32767 |
long int | 4 | -2147483648 to -2147483647 |
unsigned int | 2 | 0 to 65535 |
float | 4 | 3.4 e-38 to 3.4e+38 |
double | 8 | 1.7e-308 to 1.7e+308 |
long double | 10 | 3.4e-4932 to 1.1e+4932 |
char | 1 | -128 to 127 |
unsigned char | 1 | 0 to 255 |