Does ^ not work as I have used?

I have used ^ but it shows that this can’t be used with int as it is used with bitwise but then how should I do it?

^ is bitwise xor , it is not used for power
you can use it on integers

what you wan to do??
find power?
to find power use pow() function

I want to do xor only. Can you see the question?

yes i have seen the question
here you have given 2 arrays
^( xor) will work on integers not on arrays

for the array you can just use a loop
if both elements of array are equal then print 0 else 1

Input is not in array format rather it is a number.

yes
i mean you can assume them as array(character array or string)

check this code

This is working but why can’t I use ^ or is there any alternative to strings? Can’t I do it by taking it in variable?

ok, I got it. Thanks!

you want to take input as integer??
then you can’t take xor directly

ok if you got then i am resolving the doubt

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.