For implementation of recursion system uses ______ data structure.

2020

For implementation of recursion system uses ______ data structure.

  1. A.

    Linked List

  2. B.

    Deque

  3. C.

    Stack

  4. D.

    Queue

Attempted by 635 students.

Show answer & explanation

Correct answer: C

When a function calls itself recursively, the system needs to remember the execution state of the previous call. It uses a Stack data structure (called the system call stack) operating on a LIFO (Last-In, First-Out) basis to push active activation records and pop them when returning.

Explore the full course: Niacl Ao It Specialist