Question: *Program is in C* Write a recursive function to compute a^b for integers a and b. For the recursive use the following equality a^b =

*Program is in C*
Write a recursive function to compute a^b for integers a and b. For the recursive use the following equality a^b = a^b - 1 * a and a^0 = 1. What does the following recursive function do? int mystery(int a, int b) {if (b == 1) return (a); else return (a + mystery(a, b - 1));}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
