Question: Consider the following recursive method. public int puzzle ( int num ) { if ( num 1 ) return 1 ; else return num +
Consider the following recursive method.
public int puzzleint num
if num
return ;
else
return num puzzlenum ;
What value is returned when puzzle is called?
A
B
C
D
E Nothing is returned. Infinite recursion causes a stack overflow error.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
