Data Type Ranges on MSDN:
-
signed char
: -127 to 127 (note, not -128 to 127; this accommodates 1's-complement platforms) -
unsigned char
: 0 to 255 - "plain"
char
: -127 to 127 or 0 to 255 (depends on default char signedness) -
signed short
: -32767 to 32767 -
unsigned short
: 0 to 65535 -
signed int
: -32767 to 32767 -
unsigned int
: 0 to 65535 -
signed long
: -2147483647 to 2147483647 -
unsigned long
: 0 to 4294967295 -
signed long long
: -9223372036854775807 to 9223372036854775807 -
unsigned long long
: 0 to 18446744073709551615
A C++ (or C) implementation can define the size of a type in bytes sizeof(type)
to any value, as long