C++: The Complete Reference



Modifying the Basic Types
Except for type void, the basic data types may have various modifiers preceding them.
You use a modifier to alter the meaning of the base type to fit various situations more
precisely. The list of modifiers is shown here:

signed
unsigned
long
short

C h a p t e r 2 :
E x p r e s s i o n s
15
Type
Typical Size in Bits
Minimal Range
char
8
-
127 to 127
unsigned char
8
0 to 255
signed char
8
-
127 to 127
int
16 or 32
-
32,767 to 32,767
unsigned int
16 or 32
0 to 65,535
signed int
16 or 32
same as int
short int
16
-
32,767 to 32,767
unsigned short int
16
0 to 65,535
signed short int
16
same as short int
long int
32
-
2,147,483,647 to
2,147,483,647
signed long int
32
same as long int
unsigned long int
32
0 to 4,294,967,295
float
32
Six digits of precision
double
64
Ten digits of precision
long double
80
Ten digits of precision
Table 2-1.