Solved

Consider the Following Definition of a Recursive Method

Question 49

Multiple Choice

Consider the following definition of a recursive method.public static int recFunc(int num)
{
If (num >= 10)
Return 10;
Else
Return num * recFunc(num + 1) ;
}What is the output of the following statement?System.out.println(recFunc(10) ) ;


A) 10
B) 110
C) This statement results in infinite recursion.
D) None of these

Correct Answer:

verifed

Verified

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

Related Questions