In the following code segment what will be the result of the function, value of x , value of y
unsigned int x=-1;
y = ~0;
if(x == y)
Please explain how this works. From my side its answer will be "not same" but its actual answer is "same". -1 for an awful, extremely general title.