Solved

Example Code Ch 12-2

Question 42

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:

verifed

Verified

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

Related Questions