Data Types Sizes
data type | bits | bytes | max in dec | max in hex |
---|---|---|---|---|
char |
8 | 1 | 127 | 0xff |
unsigned char |
8 | 1 | 255 | 0xff |
int8_t |
8 | 1 | 127 | 0xff |
uint8_t |
8 | 1 | 255 | 0xff |
short |
16 | 2 | 32,767 | 0xffff |
unsigned short |
16 | 2 | 65,535 | 0xffff |
int16_t |
16 | 2 | 32,767 | 0xffff |
uint16_t |
16 | 2 | 65,535 | 0xffff |
int |
32 | 4 | 2,147,483,647 | 0xffffffff |
unsigned int |
32 | 4 | 4,294,967,295 | 0xffffffff |
int32_t |
32 | 4 | 2,147,483,647 | 0xffffffff |
uint32_t |
32 | 4 | 4,294,967,295 | 0xffffffff |
long long |
64 | 8 | 9,223,372,036,854,775,807 | 0xffffffffffffffff |
unsigned long long |
64 | 8 | 18,446,744,073,709,551,615 | 0xffffffffffffffff |
int64_t |
64 | 8 | 9,223,372,036,854,775,807 | 0xffffffffffffffff |
uint64_t |
64 | 8 | 18,446,744,073,709,551,615 | 0xffffffffffffffff |