Datatype | Memory size | Range |
---|---|---|
int | 2 bytes(±215) or 4 bytes(±231) |
-32,768 to 32,767 or -2,147,483,648 to 2,147,483,647 |
short int | 2 bytes(±215) | -32,768 to 32,767 |
long int | 4 bytes(±231) | -2,147,483,648 to 2,147,483,647 |
long long int | 8 bytes(±263) | –9,223,372,036 ,854,775,808 to 9,223,372,036 ,854,775,807 |
unsigned int | 2 bytes(216) or 4 bytes(232) |
0 to 65,535 or 0 to 4,294,967,295 |
unsigned short int | 2 bytes(216) | 0 to 65,535 |
unsigned long int | 4 bytes(232) | 0 to 4,294,967,295 |
unsigned long long int | 8 bytes(264) | 0 to 18,446,744,073, 709,551,615 |
signed int | 2 bytes(±215) or 4 bytes(±231) |
-32,768 to 32,767 or -2,147,483,648 to 2,147,483,647 |
signed short int | 2 bytes(±215) | -32,768 to 32,767 |
signed long int | 4 bytes(±231) | -2,147,483,648 to 2,147,483,647 |
double | 8 bytes(±231) | 2.2E-308 to 1.8E+308 |
long double | 10 bytes | 3.4E-4932 to 1.1E+4932 |