int_t 类
Specifier | Common Equivalent | Signing | Bits | Bytes | Minimum Value | Maximum Value |
---|---|---|---|---|---|---|
int8_t | signed char | Signed | 8 | 1 | -128 | 127 |
uint8_t | unsigned char | Unsigned | 8 | 1 | 0 | 255 |
int16_t | short | Signed | 16 | 2 | -32,768 | 32,767 |
uint16_t | unsigned short | Unsigned | 16 | 2 | 0 | 65,535 |
int32_t | int | Signed | 32 | 4 | -2,147,483,648 | 2,147,483,647 |
uint32_t | unsigned int | Unsigned | 32 | 4 | 0 | 4,294,967,295 |
int64_t | long | Signed | 64 | 8 | -9,223,372,036,854,775,808 | 9,223,372,036,854,775,807 |
uint64_t | unsigned long | Unsigned | 64 | 8 | 0 | 18,446,744,073,709,551,615 |
size_t、ssize_t 类
Specifier | Common Equivalent | Machines Bits | Range |
---|---|---|---|
size_t | typedef unsigned int | 32位机器 | 见上表 |
size_t | typedef unsigned long | 64位机器 | 见上表 |
ssize_t | typedef int | 32位机器 | 见上表 |
ssize_t | typedef long | 64位机器 | 见上表 |