Which of the following is NOT an application of a stack ?
2025
Which of the following is NOT an application of a stack ?
- A.
Undo operation in text editors.
- B.
Expression evaluation
- C.
Recursion
- D.
Memory management in OS
Attempted by 210 students.
Show answer & explanation
Correct answer: D
The correct answer is Option D (Memory management in OS). While stacks are fundamental to memory management for handling function calls and local variables via the call stack, the term 'memory management' broadly encompasses tasks like allocation, deallocation, and paging which primarily rely on data structures such as heaps, linked lists, or trees rather than stacks alone. In contrast, undo operations in text editors (Option A) rely on a stack to reverse actions in LIFO order. Expression evaluation (Option B) uses stacks for converting infix notation to postfix and evaluating results. Recursion (Option C) inherently depends on the system stack to store activation records for each function call. Therefore, while stacks play a role in specific OS functions, memory management as a whole is not exclusively or primarily defined by stack applications compared to the other specific examples listed.