Primitives#
The base set, with sizes you should not assume.
Type |
Notes |
|---|---|
|
1 byte. Signedness is implementation-defined;
|
|
at least 16 bits. |
|
at least 16; typically 32 on every modern host. |
|
at least 32. 32-bit on Windows x64; 64-bit on Linux x64. |
|
at least 64. |
|
IEEE 754 single (almost everywhere). |
|
IEEE 754 double. |
|
extended precision; 80-bit on x86, same as |
|
0 or 1. |
|
“no type”. |
Sign forms.
signed int n;
unsigned int u;
short s; /* signed short */
unsigned short us;
long long ll;
unsigned long long ull;
References#
Fixed widths for portable, fixed-width arithmetic types.
Casting for integer promotion rules.