Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Domande sulle Strutture Dati

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is a stack?

a)

A data structure that follows the FIFO principle

b)

A data structure that follows the LIFO principle (correct)

c)

A collection of unordered elements

d)

A type of two-dimensional array

2.

Which operation removes the most recent element from a stack?

a)

Enqueue

b)

Dequeue

c)

Push

d)

Pop (correct)

3.

In a queue, which operation adds an element?

a)

Pop

b)

Push

c)

Enqueue (correct)

d)

Dequeue

4.

Which of the following statements is true regarding vectors?

a)

Vectors can only contain integer numbers.

b)

Vectors have a fixed size once created. (correct)

c)

Vectors can be used to store data of different types.

d)

Vectors cannot be dynamically sized.

5.

What is the best data structure to implement an "undo" function?

a)

Queue

b)

Array

c)

Linked list

d)

Stack (correct)

6.

Which of the following operations is typical of a queue?

a)

Push

b)

Pop

c)

Enqueue (correct)

d)

All of the above

7.

If a vector has a size of 10, how many elements can it contain at most?

a)

5

b)

10 (correct)

c)

11

d)

It has no limits

8.

Which of the following statements best describes the FIFO principle?

a)

The last element added is the first to be removed.

b)

The first element added is the first to be removed. (correct)

c)

Elements can be removed in random order.

d)

Elements can only be added at the end.

9.

Which of the following operations is not typically supported by a stack?

a)

Push

b)

Pop

c)

Peek (or Top)

d)

Enqueue (correct)

10.

Which of the following statements is true regarding the LIFO principle?

a)

The first element added is the first to be removed.

b)

The last element added is the first to be removed. (correct)

c)

Elements can be removed in random order.

d)

Elements can only be added to the head.