Basic data types

Data Type Size Size Range Range Description Description
char 1 byte −128 ~ 127 single character/alphanumeric/ASCII
signed char 1 byte −128 ~ 127 -
unsigned char 1 byte 0 ~ 255 -
int 2 to 4 bytes −32,768 ~ 32,767 store integers
signed int 2 bytes −32,768 ~ 32,767
unsigned int 2 bytes 0 ~ 65,535
short int 2 bytes −32,768 ~ 32,767
signed short int 2 bytes −32,768 ~ 32,767
unsigned short int 2 bytes 0 ~ 65,535
long int 4 bytes -2,147,483,648 ~ 2,147,483,647
signed long int 4 bytes -2,147,483,648 ~ 2,147,483,647
unsigned long int 4 bytes 0 ~ 4,294,967,295
float 4 bytes 3.4E-38 ~ 3.4E+38
double 8 bytes 1.7E-308 ~ 1.7E+308
long double 10 bytes 3.4E-4932 ~ 1.1E+4932
Comments