Hi Stack overflow community recently came across this question.. where the interviewer asked me to find the power of the given number without any loop or recursive call no inbuilt.
Example :2^3 = 8 , 3 ^ 3 = 27
please let me know if there is a ans :)
My approach was
int val = 2;
int pow = 3;
while (pow != 0)
{
result *= val;
--pow;
}