Solved

In the Following Code That Uses Recursion to Find the Factorial

Question 2

Multiple Choice

In the following code that uses recursion to find the factorial of a number, what is the base case? private static int factorial(int n)
{
If (n == 0)
Return 1;
Else
Return n * factorial(n - 1) ;
}


A) factorial(int n)
B) if (n == 0)
Return 1;
C) else
Return n * factorial(n - 1) ;
D) Cannot tell from this code

Correct Answer:

verifed

Verified

Related Questions