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