Multiple Choice
Example Code Ch 12-2
Given the following recursive factorial method:
public int factorial(int x)
{
if (x > 1) return x * factorial (x - 1) ;
else return 1;
}
-Refer to Example Code Ch 12-2: What condition defines the base case for this method?
A) (x > 1)
B) (x == 1)
C) (x == 0)
D) (x <= 0)
E) (x <= 1)
Correct Answer:

Verified
Correct Answer:
Verified
Q37: A Koch snowflake of order = 1
Q38: Example Code Ch 12-2<br>Given the following recursive
Q39: Since iterative solutions often use loop variables
Q40: The recursive method to solve the Towers
Q41: Assume a function g(x) is defined as
Q43: The following method lacks a base case.<br>public
Q44: A recursive method without a base case
Q45: Example Code Ch 12-1<br>Given the following recursive
Q46: Rewrite the following iterative method as a
Q47: The Koch snowflake has an infinitely long