Mark As Completed Discussion

Are you sure you're getting this? Click the correct answer from the options.

In the context of implementing a recursive function in C++ to calculate the factorial of a number, what is the base case?

Click the option that best answers the question.

  • If `n = 2`, the function returns `2`, because `2!` equals to `2`.
  • If `n = 0`, the function returns `1`, because `0!` equals to `1`.
  • If `n = 1`, the function returns `1`, because `1!` equals to `1`.
  • If `n > 1`, then the function calls itself with `n - 1`.