Solved

Consider the Following Recursive Code Snippet: Public Int Mystery(int N

Question 70

Multiple Choice

Consider the following recursive code snippet: public int mystery(int n, int m)
{
If (n == 0)
{
Return 0;
}
If (n == 1)
{
Return m;
}
Return m + mystery(n - 1, m) ;
}
What parameter values for n would cause an infinite recursion problem in the following method?


A) n == 0
B) n == 1
C) all n with n < 0
D) all n with n >= 0

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions