Skip to content
OtisamLMS
Computing

Computing · Quick practice · answer shown after each question

Data structures: arrays, records, stacks and queues

Question 1 of 10

Question 1 of 10

Removing an item from the top of a stack is called

Question 2 of 10

Question 2 of 10

Pop removes the bottom item of a stack.

Question 3 of 10

Question 3 of 10

The "undo" feature in a word processor is best implemented with a

Question 4 of 10

Question 4 of 10

A queue works on the principle of

Question 5 of 10

Question 5 of 10

Stack underflow occurs when

Question 6 of 10

Question 6 of 10

Array elements are accessed by their index.

Question 7 of 10

Question 7 of 10

Explain the difference between a stack and a queue, giving a real-life example and a computing use of each.

Question 8 of 10

Question 8 of 10

Write Python code that uses a list as a queue to serve three customers in order.

Question 9 of 10

Question 9 of 10

Describe how a one-dimensional array can be used to store the marks of 30 pupils and find the average.

Question 10 of 10

Question 10 of 10

A stack contains (bottom to top) 3, 7, 9. After pop() then push(5), the top item is

Questions written by OtisamLMS in the style of the WASSCE. They are not WAEC past questions.