C++ examples for Data Type:int
Type Name | Number of Bytes | Minimum Value | Maximum Value |
---|---|---|---|
char | 1 | -128 | 127 |
short | 2 | -32,768 | 32,767 |
int | 4 | -2,147,483,648 | 2,147,483,647 |
long | 4 | -2,147,483,648 | 2,147,483,647 |
long long | 8 | -9,223,372,036,854,775,808 | 9,223,372,036,854,775,807 |
C++ supports unsigned versions of the integer types.
Type Name | Number of Bytes | Minimum Value | Maximum Value |
---|---|---|---|
unsigned char | 1 | 0 | 255 |
unsigned short | 2 | 0 | 65,535 |
unsigned int | 4 | 0 | 4,294,967,295 |
unsigned long | 4 | 0 | 4,294,967,295 |
unsigned long long | 8 | 0 | 18,446,744,073,709,551,615 |