I saw following code which prints output "Same" but i am having trouble in understanding this program. Please help me to understand the program.
int main()
{
unsigned int x = -1;
int y = ~0;
if(x == y)
printf("same");
else
printf("not same");
return 0;
}
How the output "Same" comes? Please help me about what happens here.