| 类型名称 |
占字节数 |
其他叫法 |
表示的数据范围 |
| char |
1 |
signed char |
-128 ~ 127 |
| unsigned char |
1 |
none |
0 ~ 255 |
| int |
4 |
signed int |
-2,147,483,648 ~ 2,147,483,647 |
| unsigned int |
4 |
unsigned |
0 ~ 4,294,967,295 |
| short |
2 |
short int |
-32,768 ~ 32,767 |
| unsigned short |
2 |
unsigned short int |
0 ~ 65,535 |
| long |
4 |
long int |
-2,147,483,648 ~ 2,147,483,647 |
| unsigned long |
4 |
unsigned long |
0 ~ 4,294,967,295 |
| float |
4 |
none |
3.4E +/- 38 (7 digits) |
| double |
8 |
none |
1.7E +/- 308 (15 digits) |
| long double |
10 |
none |
1.2E +/- 4932 (19 digits) |
转自https://www.dotcpp.com/course/10
| C语言中的32个关键字 |
| auto |
double |
int |
struct |
| break |
else |
long |
switch |
| case |
enum |
register |
typedef |
| char |
extern |
return |
union |
| const |
float |
short |
unsigned |
| continue |
for |
signed |
void |
| default |
goto |
sizeof |
volatile |
| do |
if |
static |
while |