Which of the following is the correct base case for a recursive function that…
Bihar STET · PGT (Paper 2) · Computer Science · 2025
Which of the following is the correct base case for a recursive function that computes the factorial of a non-negative integer n, so that the recursion terminates correctly for every valid input (including n = 0)?
- A.
n == 0
- B.
n == 1
- C.
n < 0
- D.
n > 0
Attempted by 967 students.
Show answer
Correct answer: A
Explore the full course: Bihar Stet Paper Ii Computer Science
Loading lesson…