Answer:
int power(int base,int exponent)
{
if(exponent==1)//base case.
return base;
return base*power(base,exponent-1);//recursive call.
}
Step-by-step explanation:
The above written function is for calculating base^exponent using recursion.In calculating the power n of a number we have multiply that number with itself n times.So the recursion is calculating the base^exponent-1 and we are multiplying the last base by ourselves.