Xor profit problem

please check what is the problem in my code?

Why are you doing this?
x^x is 0, y^y is 0.
so effectively you are printing x^y which is incorrect.

I’m not able to understand the question, what actually we have to do in this question?

you need to find two numbers a and b in the range from x to y, such that their xor is maximum

https://ide.codingblocks.com/s/330821 , bhaiya ab check karna sahi hai?

Yes this is correct.

Okay bhaiya , thank you.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.