ITPEC IP October 2025 Question 7
ITPEC IP October 2025 — Question 7 of 100
The last stored data is extracted first — a stack follows last-in, first-out order.
Insertion, called push, and extraction, called pop, both operate at the stack's top. Consequently the most recently pushed item is the first one available to pop, like removing the top plate from a pile.
Answer (b)
Why not others:
- (a) describes random access to an arbitrary location
- (c) describes a FIFO queue, where the earliest stored item leaves first
- (d) describes a priority queue, where removal depends on a priority key
Key rule: Stack is LIFO, queue is FIFO, and priority queue selects by priority rather than solely by arrival order.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official IP past-paper collection or Report an issue.