+ 1
What is the output of this code and why ....
int main() { printf("%u",-1); return 0; }
4 Respuestas
+ 5
%u stands for unsigned, so if you try to output -1 as unsigned, you will go out of scope value, and print unsigned_max_value
If you would try printing -2, you would get
unsigned_max_value -1 etc.
At least I think it works like that
+ 2
U mean to say that am i printing the unsigned maximum values of int ?
+ 2
Yes, you are printing max unsigned int value, which is 2^32-1