Which data structure is used by a program to manage function calls and recursion?

Options

  • A. Queue
  • B. Stack
  • C. Graph
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Stack

Detailed Explanation

Correct Answer: B. Stack

Explanation: The call stack manages function calls and recursive execution.

  • Each function call creates a stack frame.
  • Local variables and return addresses are maintained in stack frames.
  • When a function returns, its stack frame is removed.