CBSE Class 12 Computer Science Question 23 of 63

Data Structures in Python — Question 6

Back to all questions
6
Question

Question 6

Which of the following applications may use a Stack?

  1. A parentheses balancing program
  2. Tracking of local variables at run time
  3. Compiler Syntax Analyzer
  4. All of these
Answer

All of these

Reason — Stacks, with their last-in-first-out (LIFO) functionality, are important in parentheses balancing programs, tracking local variables at runtime for efficient memory management, and compiler syntax analyzers for parsing expressions and managing program flow.