The basic data types supported by C are described with their size in bytes and ranges in Table 2.5.
Table 2.5 Basic data types of C with size and range
Data Type
Size in bytesRange
char
1
-128 to 127
unsigned char
1
0 to 255
signed char1
-128 to 127
int2-32768 to 32767
unsigned int20 to 65535
signed int2
-32768 to 32767
short int2
-32768 to 32767
unsigned short int
20 to 65535
signed short int
2-32768 to 32767
long int
4-2147483648 to 2147483647
signed long int
4-2147483648 to 2147483647
unsigned long int
40 to 4294967295
float
43.4E-38 to 3.4E+38
double
8
1.7E -308 to 1.7E+308
long double
10
3.4E -4
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.