MCQ
What is tail recursion?

  • A
    A recursive function that has two base cases
  • B
    A function where the recursive functions leads to an infinite loop
  • C
    A recursive function where the function doesn't return anything and just prints the values
  • A function where the recursive call is the last thing executed by the function

Answer

Correct option: D.
A function where the recursive call is the last thing executed by the function
(d) Explanation: A recursive function is tail recursive when recursive call is executed by the function in the last.

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free