Table 2.5. Some types of numbers in C



Word size of computer
Range


16-bit (e.g. 486 PC) 32-bit (e.g. Pentium PC)

Integer types



char
1 byte
8 bits
8 bits
-128 to 127 (or 0 to 255, for unsigned char )
int
word-sized integer
16 bits
32 bits
(as for short and long, according to word size)
short  (or short int)
fixed size, 2-byte integer
16 bits
16 bits
-32,768 to 32,767 (0 to 65,535, for an unsigned short)
long (or long int)
fixed size, 4-byte integer
32 bits
32 bits
2,147,483,648 to 2,147,483,647 (±2.2 × 109), or ±4.3 × 109, for an unsigned long
Floating point types (decimals)




float
single precision
32 bits
32 bits
±1.18 × 10-38 to ±3.4 × 1038
double
double precision (more decimal places)
64 bits
64 bits
±2.23 × 10-308 to ±1.79 × 10308

To add a further complication, though, when 2 bytes are used to store a short integer, some programs put the lower 8 bits (units, twos, fours etc.) before the higher 8 bits (the “little endian” or “Intel” convention), and some the other way round (the “big endian” or “Motorola” convention). We shall use the “Intel” convention, as a standard.