Lesson 4.2.3.1
4.2.3.1 Stack operations Quiz: AQA Computer Science, Unit 2
20 questions
In partnership with Revision Ninja
Lesson 4.2.3.1, Stack operations: 20 multiple choice questions for the AQA Computer Science (7517), Unit 2: Fundamentals of data structures, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
Which acronym describes the access order in which items are added and removed from a stack?
- FIFO
- GIGO
- LIFO
- FIPO
-
Which operation adds an item to the top of a stack?
- Peek
- Push
- Pop
- Enqueue
-
Which operation removes the top item of a stack?
- Dequeue
- Push
- Pop
- Peek
-
What stack operation reads the top value without removing it from the stack?
- Enqueue
- Pop
- Peek
- Push
-
Which condition must be checked before executing a pop operation on a stack?
- Test for full
- Test pointer limit
- Test array capacity
- Test for empty
-
What error is prevented by testing if a stack is full before pushing a new item?
- Null reference
- Stack overflow
- Stack underflow
- Syntax error
-
When implementing a stack using an array, what does the stack pointer store?
- Front element index
- Bottom element index
- Top element index
- Total array capacity
-
Values 4, 7 and 9 are pushed onto an empty stack in that order. What value is popped first?
- 4
- 16
- 7
- 9
-
A stack has 2 items. Which sequence leaves the stack with 1 item?
- Pop twice
- Peek twice
- Push twice
- Pop once
-
Given the operations push(3), push(5), pop(), push(8), pop(), pop(), what is left on the stack?
- Empty
- 3
- 5
- 8
-
A stack of capacity 3 contains 3 items. What occurs if another item is pushed?
- Bottom item removed
- Overflow error
- Underflow error
- Item is overwritten
-
What data structure is used by the operating system to store return addresses for subroutines?
- Call stack
- Adjacency list
- Circular queue
- Priority queue
-
Why is a stack suitable for checking whether brackets are balanced in an expression?
- FIFO processing order
- Dynamic sorting feature
- LIFO matching property
- Random access capability
-
A stack is used to reverse the characters of the string ABC. Pushing A, B, C then popping all of them gives which output?
- ACB
- CBA
- BCA
- ABC
-
An empty stack has a top index of -1. What is the top index after pushing one item?
- -2
- Null
- 1
- 0
-
A program needs to undo the most recent action in an editor. Which ADT is most appropriate?
- Graph
- Hash table
- Queue
- Stack
-
What is the result of pushing 1, 2, 3, then popping twice and peeking?
- Empty
- 1
- 3
- 2
-
What error occurs when pushing an item onto a full fixed-size stack?
- Syntax error
- Stack underflow
- Stack overflow
- Type error
-
What main advantage does a linked list stack implementation have over a fixed array implementation?
- Dynamic memory size
- Static memory size
- Faster indexing
- Lower memory overhead
-
Which data structure accesses items in First In, First Out (FIFO) order?
- Binary tree
- Graph
- Stack
- Queue
Related quizzes
- Data structures and abstract data types Quiz · 4.2.1.1 · 20 questions
- Single- and multi-dimensional arrays Quiz · 4.2.1.2 · 20 questions
- Reading and writing text and binary files Quiz · 4.2.1.3 · 20 questions
- Linear, circular and priority queues Quiz · 4.2.2.1 · 20 questions
- Graphs: weighted, directed and adjacency representations Quiz · 4.2.4.1 · 20 questions
- Trees and binary trees Quiz · 4.2.5.1 · 20 questions
- Hash tables, hashing and collisions Quiz · 4.2.6.1 · 20 questions
- Dictionaries and key-value pairs Quiz · 4.2.7.1 · 20 questions
- Vectors and vector operations Quiz · 4.2.8.1 · 20 questions
- Data types Quiz · 4.1.1.1 · 20 questions