If the two numbers are same, we can find that out using this XOR condition:

Code:
if(x^y)
  printf("Both not equal");
else
  printf("Both equal");
Logic:
If x and y are equal, then condition becomes if(0).