#include<stdio.h>
int main()
{
unsigned short int x=-10;
short int y=-10;
unsigned int z=-10000000;
int m=-10000000;
printf("x=%d y=%d z=%d m=%d",x,y,z,m);
return 0;
}
输出=x=65526 y=-10 z=-10000000 m=-10000000
我的查询是unsigned short int
与unsigned int
数据持有情况有何不同。即 x=65526 where as z=-10000000 why x is not equal -10 where as z can hold any data
短是2个字节,但twos complement -10 is 65526
为什么不一样case
z