Introduction to Data Structures: Terminology and Classification: 17 MCQs with answers

All 17 multiple-choice questions from this kit, free and with no sign-up.

Warm-up · 6 questions

Q1. Which of the following is a primitive data structure?

Beginner
A Tree B Linked list C Array D Integer
Show answer & explanation

Integer

Integer is a basic, built-in type that holds a single value. Array, linked list, and tree are non-primitive collections.

Q2. Which pair correctly lists only non-linear data structures?

Beginner
A Integer and float B Tree and graph C Stack and queue D Array and linked list
Show answer & explanation

Tree and graph

Tree and graph arrange elements in a hierarchy or network, making them non-linear. Array, linked list, stack, and queue are linear.

Q3. What is the time complexity of random access in an array?

Beginner
A $O(1)$ B $O(n^2)$ C $O(\log n)$ D $O(n)$
Show answer & explanation

$O(1)$

Arrays use contiguous storage, so any element can be reached directly by its index in constant time, $O(1)$.

Q4. Which of the following is NOT a primitive data structure?

Beginner
A Pointer B Queue C Boolean D Character
Show answer & explanation

Queue

Queue is a non-primitive linear structure. Character, boolean, and pointer are all primitive types.

Q5. What is the search time complexity in a balanced tree?

Beginner
A $O(1)$ B $O(n)$ C $O(n \log n)$ D $O(\log n)$
Show answer & explanation

$O(\log n)$

A balanced tree halves the search space at each step, giving $O(\log n)$ search time.

Q6. Data structures are classified first into primitive and non-primitive, and non-primitive structures are further split into linear and non-linear.

Beginner
A True B False
Show answer & explanation

True

Data structures are classified first into primitive and non-primitive, and non-primitive structures are further split into linear and non-linear.

Building up · 6 questions

Q7. A student says an array of integers is a primitive data structure because it holds integers. What is wrong with this reasoning?

Intermediate
A Arrays are primitive only when they store characters. B Arrays are always primitive because integers are primitive. C The array is a container built from primitives, so it is non-primitive. D The array is primitive because it uses contiguous storage.
Show answer & explanation

The array is a container built from primitives, so it is non-primitive.

The integers inside the array are primitive, but the array itself is a non-primitive structure built from them. The container and its contents belong to different categories.

Q8. A program needs to store a week of temperature readings and access them quickly by day number. Which structure is most suitable?

Intermediate
A A primitive float B A graph C A tree D An array
Show answer & explanation

An array

An array is a linear non-primitive structure that gives $O(1)$ random access by index, ideal for accessing readings by day number.

Q9. Which statement about the classification of data structures is correct?

Intermediate
A Primitive structures are split into linear and non-linear. B Only non-primitive structures are split into linear and non-linear. C Both primitive and non-primitive structures are split into linear and non-linear. D Linear and non-linear are types of primitive structures.
Show answer & explanation

Only non-primitive structures are split into linear and non-linear.

The linear/non-linear split applies only to non-primitive structures, because a single primitive value has no arrangement to describe.

Q10. An editor's undo feature and a printer's job scheduling both rely on data structures. Which pair correctly matches them?

Intermediate
A Undo uses a queue; printing uses a stack. B Both use queues. C Undo uses a stack; printing uses a queue. D Both use stacks.
Show answer & explanation

Undo uses a stack; printing uses a queue.

Undo reverses the last action first, which is stack behaviour (LIFO). Printing processes jobs in arrival order, which is queue behaviour (FIFO).

Q11. Which data structure would best model a file system where folders contain other folders?

Intermediate
A Array B Tree C Queue D Stack
Show answer & explanation

Tree

A tree is a non-linear structure that models hierarchical data such as folders inside folders.

Q12. Which of the following correctly describes the hierarchy of data structure classification?

Intermediate
A Data structures → primitive/non-primitive → linear/non-linear B Data structures → primitive → linear → non-primitive C Data structures → linear/non-linear → primitive/non-primitive D Data structures → non-linear → primitive → linear
Show answer & explanation

Data structures → primitive/non-primitive → linear/non-linear

The first cut is primitive vs non-primitive, and only non-primitive structures are further divided into linear and non-linear.

Topper level · 5 questions

Q13. A developer needs a structure that can grow and shrink easily but accepts slower traversal. Which storage method fits best?

Advanced
A Linked storage B Fixed-size primitive storage C Contiguous storage D Boolean storage
Show answer & explanation

Linked storage

Linked storage gives flexible size because elements can sit anywhere in memory and connect via pointers, at the cost of slower traversal.

Q14. Consider the following statements: I. Primitive structures hold a single value. II. Non-primitive structures are also called composite structures. III. Primitive structures are divided into linear and non-linear. Which statements are correct?

Advanced
A I and III only B I, II, and III C I and II only D II and III only
Show answer & explanation

I and II only

Statements I and II are correct. Statement III is false because the linear/non-linear split applies only to non-primitive structures.

Q15. Assertion (A): An array of integers is a non-primitive data structure. Reason (R): The array is a collection built from primitive integer values. Which option correctly judges A and R?

Advanced
A A is false but R is true. B A is true but R is false. C Both A and R are true, and R correctly explains A. D Both A and R are true, but R does not explain A.
Show answer & explanation

Both A and R are true, and R correctly explains A.

The array is non-primitive because it is a collection built from primitive integers. R is the correct reason for A.

Q16. A road map application needs to find the shortest route between cities. Which structure is most appropriate?

Advanced
A A stack B A primitive float C A graph D A queue
Show answer & explanation

A graph

A graph is a non-linear structure that models networks of arbitrary relationships, such as roads connecting cities.

Q17. Given the following data structure definitions: 1) A queue is a linear non-primitive structure that allows insertion at one end and removal at the other. 2) A tree is a non-linear structure that organizes data hierarchically. 3) A pointer is a primitive data structure that holds a memory address. Which of the following statements is true regarding their classifications?

Advanced
A Only the queue and tree are non-primitive structures. B All three structures are classified as non-primitive. C The pointer is a non-primitive structure because it points to a value. D All three structures can be classified as linear data structures.
Show answer & explanation

Only the queue and tree are non-primitive structures.

The queue and tree are indeed non-primitive structures, as they are collections built from primitive types. The pointer, however, is a primitive data structure that holds a single value (a memory address) and does not fit into the non-primitive category.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Exam prep

Get Veda free See what students get

Free to start · No ads · Works in 42 languages