I am currently learning C++. I was trying to compute power of an integer using the expression:
val=10^1;
Instead of expected answe
In C and C++, 10^1 is 10 XOR 1, not 10 to the power of 1.
10^1
10 XOR 1
10 to the power of 1