Given the recursive method definition:
public static int recurMethod (int num)
{
if (num >
10)
return num;
else
return num + recurMethod(num / 4);
}
And the initial call:
int answer = recurMethod(320);
list the values that will be returned from each call to the previous call of recursMethod.
Start with the last recursive call, and work backwards, with one space between each returned value, ending with the value returned to the original call.
For example, if there were 2 recursive calls,
and recursive call 2 returned 12,
recursive call 1 returned 14,
and the initial call returned 16, your answer would
be: 12 14 16
Here only the we dont have any recursive call as base condition is true for the initial value int self
like 320> 10 than it is returning the 320 directly with out going to the recursive calls
Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
Get Answers For Free
Most questions answered within 1 hours.