October 1997
Intermediate to advanced
800 pages
20h 48m
English
The C++ compiler manipulates built-in types in your programs. Data type representation is machine specific in C++, but Table 2.1 lists typical sizes.
| Built-in Type | 16-Bit Word Size | 32-Bit Word Size | 64-Bit Word Size |
|---|---|---|---|
| char (signed) | 8 | 8 | 8 |
| wchar_t (signed) | 16 | 16 | 16 |
| int (signed) | 16 | 32 | 32 |
| bool | 16 | 32 | 32 |
| short (signed) | 16 | 16 | 16 |
| long (signed) | 32 | 32 | 64 |
| float (signed) | 32 | 32 | 32 |
| double (signed) | 64 | 64 | 64 |
| unsigned char | 8 | 8 | 8 |
| unsigned int | 16 | 32 | 32 |
| unsigned short | 16 | 16 | 16 |
| unsigned long | 32 | 32 | 64 |
| long double (signed) | 64 | 128 | 128 |
Integer formats (one's complement or two's complement) and extended precision formats are machine dependent and have different representations. Built-in ...