a是整型,b是短整型b=a; 溢出了,所以显示为负数应该选: D, C
#include<stdio.h> int main() { int a; short b; a=32768; b=a; printf("%d %d",a,b); return 0; }
写反了吧,数据转换,会有精度损失,int到short转换也会有数据丢失,表示的最大范围不一样