Ace the A Level Computer Science OCR 2025 – Code Your Way to Success!

Image Description

Question: 1 / 400

What operation does a stack support?

Only push operations

Push and pop operations

A stack is a data structure that follows the Last In, First Out (LIFO) principle, meaning that the last element added to the stack is the first one to be removed. The primary operations that a stack supports are push and pop.

The push operation allows an element to be added to the top of the stack, while the pop operation removes the top element from the stack. This pair of operations enables stacks to maintain their structured order, making them suitable for various applications such as function call management, expression evaluation, and backtracking algorithms.

In summary, stacks facilitate the addition and removal of elements in a specific order through push and pop operations, which are vital for their functionality and usability in computing tasks.

Get further explanation with Examzify DeepDiveBeta

Only pop operations

Both enqueue and dequeue operations

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy