Time:10-05
CodePudding user response:
int has the sign bit Unsigned int unsigned number
the first thing you see how negative in memory is the binary representation of the, 1=62235 this is pulled eggs, you are likely to appear this kind of situation, probably because you defined is short int, you first have to understand all kinds of memory points and length,
figure 1 m=1 is the return value (unsigned short) 65535, so in the type to int value is 65535, figure 2 short int is not short, in the same type unsigned and signed the assignment, the two bytes of memory is copied short, unsigned short of the 65535-1 with short memory is the same, is FFFF, just didn't look at the sign bit difference when reading leads to a value of 1, 65535,
Page link:https//www.codepudding.com/Backend/52245.html