Skip to Content
Navigating C++ and Object-Oriented Design
book

Navigating C++ and Object-Oriented Design

by Paul Anderson, Gail Anderson
October 1997
Intermediate to advanced
800 pages
20h 48m
English
Pearson
Content preview from Navigating C++ and Object-Oriented Design

2.1. Data Representation and Built-in Types

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.

Table 2.1. Typical built-in type sizes in bits
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 ...

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.
Start your free trial

You might also like

Exploring C++20: The Programmer's Introduction to C++

Exploring C++20: The Programmer's Introduction to C++

Ray Lischner

Publisher Resources

ISBN: 0135327482Purchase book