MCQ Single Best Answer Easy

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

ID: #7183 Function in C Language 181 views
Question Info
#7183Q ID
EasyDifficulty
Function in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're 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: Option 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

Challenge a friend or share with your study group.