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?
BeginnerShow 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?
BeginnerShow 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?
BeginnerShow 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?
BeginnerShow 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?
BeginnerShow 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.
BeginnerShow 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?
IntermediateShow 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?
IntermediateShow 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?
IntermediateShow 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?
IntermediateShow 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?
IntermediateShow 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?
IntermediateShow 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?
AdvancedShow 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?
AdvancedShow 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?
AdvancedShow 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?
AdvancedShow 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?
AdvancedShow 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.
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