#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