**16位编译器:
char/unsigned char :1字节
char :2字节
short int:2字节
int/unsigned int:2字节
long int:4字节
float:4字节
double:8字节*
32位编译器:
*char/unsigned char :1字节
char :4字节
short int:2字节
int/unsigned int:4字节
long int:4字节
float:4字节
double:8字节
long long:8字节
long double:12字节
64位编译器:
char/unsigned char :1字节
char *:8字节
short int:2字节
int/unsigned int:4字节
long int:8字节
float:4字节
double:8字节
long long:8字节
long double:16字节
具体可以用sizeof测试一下即可。

| 类型 | 16位 | 32 位 | 64位 |
|---|---|---|---|
| char | 1 | 1 | 1 |
| short int | 2 | 2 | 2 |
| int | 2 | 4 | 4 |
| unsigned int | 2 | 4 | 4 |
| float | 4 | 4 | 4 |
| double | 8 | 8 | 8 |
| long | 4 | 4 | 8 |
| long long | 8 | 8 | 8 |
| unsigned long | 4 | 4 | 8 |
C语言基本数据类型(所占字节数)_c语言字节数_kkkkkkc1的博客-CSDN博客
C语言中几种类型所占字节数_cherishinging的博客-CSDN博客


















