Solved

In the Following Code That Uses Recursion to Find the Factorial

Question 22

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

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents