c++ data type

Type Size in Bytes Range
char 1 -127 to 127 or 0 to 255
unsigned char 1 0 to 255
signed char 1 -127 to 127
int 4 -2147483648 to 2147483647
unsigned int 4 0 to 4294967295
signed int 4 -2147483648 to 2147483647
short int 2 -32768 to 32767
unsigned short int 2 0 to 65,535
signed short int 2 -32768 to 32767
long int 4 -2,147,483,647 to 2,147,483,647
signed long int 4 same as long int
unsigned long int 4 0 to 4,294,967,295
float 4 +/- 3.4e +/- 38 (~7 digits)
double 8 +/- 1.7e +/- 308 (~15 digits)
long double 8 +/- 1.7e +/- 308 (~15 digits)
bool 1 true or false
wchar_t 2 1 wide character

Search within Codexpedia

Custom Search

Search the entire web

Custom Search