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

A queue works on the principle of

Question 2 of 10

Question 2 of 10

A stack is a last-in, first-out structure.

Question 3 of 10

Question 3 of 10

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

Question 4 of 10

Question 4 of 10

A record can hold fields of different data types.

Question 5 of 10

Question 5 of 10

A queue follows the ___ principle (four letters).

Question 6 of 10

Question 6 of 10

Stack underflow occurs when

Question 7 of 10

Question 7 of 10

A stack follows the ___ principle (four letters).

Question 8 of 10

Question 8 of 10

A collection of related fields of different types is a ___.

Question 9 of 10

Question 9 of 10

Adding an item to a stack is called a ___.

Question 10 of 10

Question 10 of 10

An empty stack has these operations: push(4), push(8), pop(), push(2), push(6), pop(). Show the stack after each step and state what is returned by each pop.

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