小编Paw*_*mar的帖子

计划的产出

#include<stdio.h>

int main() {
 short int i=20;
char c=97;
printf("%d,%d,%d",sizeof(i),sizeof(c),sizeof(c+i));
return 0;
}
Run Code Online (Sandbox Code Playgroud)

假设给定short int = 2的大小,char为1而int为4B Well如果我在机器上运行则给出2,1,4但是ans是2,1,2

c sizeof integer-promotion

-2
推荐指数
1
解决办法
48
查看次数

标签 统计

c ×1

integer-promotion ×1

sizeof ×1