相关疑难解决方法(0)

这里发生了什么?sizeof(short_int_variable + char_variable)

#include <stdio.h>
 int main()        
{

           short int i = 20;

            char c = 97;

            printf("%d, %d, %d\n", sizeof(i), sizeof(c), sizeof(c + i));
            return 0;
}
Run Code Online (Sandbox Code Playgroud)

有人可以告诉我当sizeof(a + b)"a是短int类型&b是char类型时会发生什么"输出是:2,1,4

c variables sizeof

8
推荐指数
1
解决办法
243
查看次数

标签 统计

c ×1

sizeof ×1

variables ×1