B. Data Types
Although the C++ specification is somewhat general when it comes to ranges of types, certain ranges are (for all practical purposes) universal on computers with a 32-bit architecture. This includes all personal computers in use today, both PCs and Macs. However, some of these ranges are subject to change. When 64-bit architecture becomes standard, for example, you should expect int to be identified with 64-bit integers.
The int and double types are the “natural” sizes for integer and floating-point numbers, respectively, for the computer’s own architecture. This means that when any integer type is used in an expression (such as char), it is automatically promoted to int provided it can be done so without loss of information. There ...
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.
Read now
Unlock full access