What are the new features that ISO/ANSI C++ has added to original C++ specifications?
New Data types:
- bool
- wchar_t
New operators
- const_cast
- static_cast
- dynamic_cast
- reinterpret_cast
- typeid
Class implementation
- Explicit constructors
- Mutable members
Namespace scope
Operator keywords
New keywords
New headers
What are the Sizes and ranges of the Basic C++ data types?
Following table is with respect to a 16-bit word machine:
Type | Bytes | Range |
char | 1 | -128 to 127 |
unsigned char | 1 | 0 to 255 |
signed char | 1 | -128 to 127 |
int | 2 | -32768 to 32767 |
unsigned int | 2 | 0 to 65535 |
signed int 2 | 2 | -32768 to 32767 |
short int 2 | 2 | -32768 to 32767 |
unsigned short int | 2 | 0 to 65535 |
signed short int | 2 | -32768 to 32767 |
long int 4 | 4 | -2147483648 to 2147483647 |
signed long int | 4 | -2147483648 to 2147483647 |
unsigned long int | 4 | 0 to 4294967295 |
float 4 | 4 | 3.4E-38 to 3.4E+38 |
double 8 | 8 | 1.7E-308 to 1.7E+308 |
long double | 10 | 3.4E-4932 to 1.1E+4932 |