MCQ Practice Single Best Answer Topic: Function in C Language

Q Which of the following is true about recursive functions in C language?

Question ID
#7183
Subchapter
Function in C Language
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A A recursive function cannot call itself.
  • B A recursive function must have a base case to terminate the recursion.
  • C A recursive function must have a return type of void.
  • D A recursive function cannot be called from another function.
Correct Answer: B

Explanation

Answer: b. A recursive function must have a base case to terminate the recursion.

Explanation: A recursive function is a function that calls itself. To prevent infinite recursion, a recursive function must have a base case that terminates the recursion. The base case is a condition that is tested at each recursive call to determine whether the recursion should continue or terminate.

Share This Question

Share this MCQ with your friends or study group.