Explanation
here ^ is known as bitwise XOR operator which perform the XOR option on bits
in this question 2^5 :
2=> 010 binary of 2
5=> 101 binary of 5
2^5=> 111 which is 7 in decimal
so the answer is 7
(in XOR if bits are same the it gives 0 and if bits are deferent the it give 1)