I have the following code:
char x = -1;
int y = x;
printf("%u
", x);
printf("%u
", y);
The output is:
4294967295
4294967295
I dont understand why x can get such a value. I know that the maximum value of a unsigned char is 255 and for a signed char 127. How can it be 4294967295?
See Question&Answers more detail:os