c语言基本数据类型相关
1byte = 8bit
| 数据类型 | 比特长度 | 位长度 | IO表达 |
| int | 2/4 | 16/32 | %d |
| unsigned (int) | 2/4 | 16/32 | %u |
| short int | 2 | 16 | %hd |
| long int | 4 | 32 | %ld |
| float | 4 | 32 | %f |
| double | 8 | 64 | %f 输入为%lf |
| char | 1 | 8 | %c |
| char * | n | 8*n | %s |
| 注释 | |||
| %d | |||
| %nd | |||
| %0nd | |||
| %+nd %-nd | |||
| %0nd | |||
| 函数 | 返回类型 | ||
| sizeof(...) | long unsigned int | ||

浙公网安备 33010602011771号