变量和类型(一)

2020-04-30  本文已影响0人  忻恆

· The arithmetic types are divided into two categories: integral types (which include character and boolean types) and floating-point types.

· the number of bits in—the arithmetic types varies across machines.

· 规定了类型最小的大小, compilers are allowed to use larger sizes for these types.

· Because the number of bits varies, the largest (or smallest) value that a type can represent also varies.

bool : NA

char : 8 b

wchar_t : 16b

char16_t : unicode 16b

char32_t : unicode 32b

short : short int 16b

int : 16b

long : 32b

long long : 64b

float : 6 significant digits(有效位)

double : 10 significant digits 

long double : 10 significant digits 

· a char is the same size as a single machine byte

上一篇 下一篇

猜你喜欢

热点阅读