1.1两个char类型数据相加后,转化为int类型
#include<stdio.h>
main()
{
char a = 127;
char i=0;
char ai=0;
ai= a+i;
printf("size short= %d\n",sizeof(short));
printf("size short int= %d\n",sizeof(short int));
printf("size char= %d\n",sizeof(char));
printf("size int = %d\n",sizeof(int));
printf("size a+i= %d\n",sizeof(a+i));
printf("size ai = %d\n",sizeof(ai));
getchar() ;
}
运行结果:
转载请注明出处。https://www.cnblogs.com/jyfootprint/p/9457346.html