Primitive Built-in Types
Type | Implication | Minimum storage space |
bool | boolean | NA |
char | character | 8 bits |
wchar_t | wide character | 16 bits |
short | short integer | 16 bits |
int | integer | 16 bits |
long | long integer | 32 bits |
float | single-precision floating-point | 6 significant digits |
double | double-precision floating-point | 10 significant digits |
long double | extended-precision floating-point | 10 significant digits |
Integral types (except the boolean type) may be either signed or unsigned
Unlike other integral types, there are three distict types for char:
plain char equals to char
signed char
unsigned char
时间: 2024-10-29 19:06:50