Class 1 Class 2 Class 3 Class 4 Class 5 Class 6 Class 7 Class 8

Data Structure MCQ

Share Now

Understanding data structures is very important. Data structures help in organizing and storing data efficiently so that it can be accessed and used easily.

In this post, we have provided a collection of Data Structure MCQ questions with answers that are useful for students, beginners, and exam preparation. These questions cover important topics like arrays, stacks, queues, and basic concepts of data structures.

Data Structure MCQ

1. What is a data structure?
a. A programming language
b. An operating system
c. A way to store and organise data
d. None of the above

Show Answer ⟶
c. A way to store and organise data

2. Which of the following is known as a linear data structure?
a. Binary Tree
b. Graph
c. Hash Table
d. Array

Show Answer ⟶
d. Array

3. Examples of data structures are __.
a. Array
b. List
c. Binary Tree
d. All of the above

Show Answer ⟶
d. All of the above

4. Finding the location of a record with a given key value is known as __.
a. Searching
b. Traversing
c. Sorting
d. None of the above

Show Answer ⟶
c. Sorting

5. The maximum number of nodes of a symmetric binary tree with a depth of 7 is __.
a. 125
b. 127
c. 128
d. None of the above

Show Answer ⟶
b. 127

6. The data in the data structure are processed by certain operations like _.
a. Traversing
b. Shorting
c. Searching
d. All of the above

Show Answer ⟶
d. All of the above

7. Which of the following operations is used for processing certain items in a record, and each record is accessed exactly once?
a. Traversing
b. Searching
c. Inserting
d. Sorting

Show Answer ⟶
a. Traversing

8. Which of the following operations is used for arranging the records in some order?
a. Traversing
b. Searching
c. Inserting
d. Sorting

Show Answer ⟶
d. Sorting

9. __ is a step-by-step list of well-defined instructions for solving a particular problem.
a. Algorithm
b. Variable
c. Instruction
d. None of the above

Show Answer ⟶
a. Algorithm

10. In data structures the variable name is generally given in __.
a. Small letter
b. Capital letter
c. Toggle letter
d. None of the above

Show Answer ⟶
a. Small letter

11. _ data structure does not require contiguous memory allocation.
a. Array
b. Linked List
c. String
d. Pointer array

Show Answer ⟶
b. Linked List

12. A record is a collection of _.
a. Files
b. Arrays
c. Fields
d. Maps

Show Answer ⟶
c. Fields

13. The LIFO (Last in, First out) principle is used in which of the following data structures?
a. Stack
b. Queue
c. Linked List
d. Tree

Show Answer ⟶
a. Stack

14. Which of the following is a non-linear data structure?
a. Queue
b. Stack
c. Tree
d. Array

Show Answer ⟶
c. Tree

15. When the certain field may uniquely determine the record in a file is known as _.
a. Primary Key
b. Foreign Key
c. Digital Key
d. None of the above

Show Answer ⟶
a. Primary Key

16. A _ is a list of a finite number n of homogeneous data elements.
a. Array
b. Queue
c. Array
d. Tree

Show Answer ⟶
a. Array

17. Which of the following best describes an array in C++?
a. A collection of variables of different types
b. A collection of variables of the same types
c. A dynamic data structure with linked nodes
d. None of the above

Show Answer ⟶
b. A collection of variables of the same types

18. If an array has 10 elements, then what will be the valid range of indices?
a. 1 to 10
b. -1 to 9
c. 0 to 10
d. 0 to 9

Show Answer ⟶
c. 0 to 10

19. In an array, which of the following is a default initial value?
a. -1
b. 0
c. 1
d. None of the above

Show Answer ⟶
b. 0

20. Which of the following is a disadvantage of arrays?
a. Constant-time access
b. Easy traversal
c. Fixed size
d. None of the above

Show Answer ⟶
c. Fixed size

21. Which of the following is commonly used for array traversal in C++?
a. Do While
b. For loop
c. GOTO Statement
d. None of the above

Show Answer ⟶
b. For loop

22. The maximum number of nodes of a symmetric binary tree with a depth of 5 is _.
a. 5
b. 25
c. 31
d. 32

Show Answer ⟶
c. 31

23. _ is very useful in situations when data is to be stored and retrieved in reverse order.
a. Stack
b. Linked List
c. Queue
d. None of the above

Show Answer ⟶
a. Stack

24. What is the space complexity of Bubble Sort?
a. O(n)
b. O(log n)
c. O(1)
d. None of the above

Show Answer ⟶
c. O(1)

25. Which of the following is true about bubble sort compared to other algorithms?
a. Bubble sort is faster than quick sort.
b. Bubble sort required extra memory.
c. Bubble sort is simple but not for a large dataset.
d. All of the above

Show Answer ⟶
c. Bubble sort is simple but not for a large dataset.

26. The time required to execute the bubble sort algorithm is proportional to _, where n is the number of input items.
a. O(n)
b. O(log n)
c. O(n²)
d. O(1)

Show Answer ⟶
c. O(n²)

27. The Binary Search can be used when __.
a. When the array is unsorted
b. When the array contains strings
c. When the array is sorted
d. None of the above

Show Answer ⟶
c. When the array is sorted

28. Which of the following is a disadvantage of binary search?
a. Fast searching
b. Requires sorted data
c. Works on arrays
d. Uses recursion

Show Answer ⟶
b. Requires sorted data

29. Which of the following techniques is used in binary search?
a. Hashing
b. Linear traversal
c. Divide and conquer
d. None of the above

Show Answer ⟶
c. Divide and conquer

30. Binary search can be implemented using _.
a. Only recursion
b. Only iteration
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

31. Which of the following is true about pointer arithmetic with arrays?
a. Adding 1 to a pointer moves 1 byte forward
b. Adding 1 to a pointer moves to the next element.
c. Multiplying a pointer by 2 doubles the value stored.
d. None of the above

Show Answer ⟶
b. Adding 1 to a pointer moves to the next element.

32. Which of the following high-level languages have built-in record structures?
a. PL/1
b. PASCAL
c. COBOL
d. All of the above

Show Answer ⟶
d. All of the above

33. What is a linked list?
a. It is a collection of elements stored in contiguous memory.
b. It’s a stack implementation.
c. It is a collection of nodes where each node contains data and a pointer to the next node.
d. All of the above

Show Answer ⟶
c. It is a collection of nodes where each node contains data and a pointer to the next node.

34. Which of the following is true about linked lists?
a. It is a dynamic memory location.
b. It is a static memory location.
c. It uses less memory.
d. None of the above

Show Answer ⟶
a. It is a dynamic memory location.

35. Which of the following is disadvantage of linked list?
a. Fixed size
b. Sequential access only
c. Difficult to insert element
d. None of the above

Show Answer ⟶
b. Sequential access only

36. What is a tree in data structure?
a. It is a linear collection of elements.
b. It is a stock implementation.
c. A hierarchical structure consists of nodes
d. None of the above

Show Answer ⟶
c. A hierarchical structure consists of nodes

37. In a binary tree each node has at least _.
a. 1 child
b. 2 children
c. 3 children
d. None of the above

Show Answer ⟶
b. 2 children

38. What is the height of a tree with only one node?
a. 0
b. 1
c. 2
d. 3

Show Answer ⟶
a. 0

39. Accessing each element of an array only once is called ‘traversal’.
a. Selecting
b. Traversing
c. Searching
d. None of the above

Show Answer ⟶
b. Traversing

40. The most efficient searching algorithm is __.
a. Binary Search
b. Linear Search
c. Reverse Search
d. None of the above

Show Answer ⟶
a. Binary Search

41. The node which has no parent is known as __.
a. Root
b. Child
c. LEAF
d. SUBLINGS

Show Answer ⟶
a. Root

42. The node which has no child is known as _.
a. Root
b. Child
c. LEAF
d. SUBLINGS

Show Answer ⟶
c. LEAF

43. Trees are classified according to node structure such as __.
a. Null tree
b. Binary tree
c. Ordered tree and non-ordered tree
d. All of the above

Show Answer ⟶
d. All of the above

44. A tree without a node is known as __.
a. Null tree
b. Binary tree
c. Ordered tree
d. Nonordered tree

Show Answer ⟶
a. Null tree

45. A tree which has a left and right child is known as __.
a. Null tree
b. Binary tree
c. Ordered tree
d. Nonordered tree

Show Answer ⟶
b. Binary tree

46. Children of each node are ordered from left to right, which is known as __.
a. Null tree
b. Binary tree
c. Ordered tree
d. Nonordered tree

Show Answer ⟶
c. Ordered tree

47. Children of each node are ordered from right to left, which is known as __.
a. Null tree
b. Binary tree
c. Ordered tree
d. Nonordered tree

Show Answer ⟶
d. Nonordered tree

48. In the expression tree the leaf nodes represent __.
a. Operators
b. Operands
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Operands

49. Which of the following operations is used to remove an element from a stack?
a. Insert
b. Pop
c. Delete
d. Push

Show Answer ⟶
b. Pop

50. Which of the following operations is used to insert an element in the stack?
a. Insert
b. Pop
c. LIFO
d. Push

Show Answer ⟶
d. Push

51. Which of the following operations is used to remove an element from a queue?
a. Enqueue
b. Pop
c. Dequeue
d. Push

Show Answer ⟶
c. Dequeue

52. Which of the following operations is used to insert an element in the queue?
a. Enqueue
b. Pop
c. Dequeue
d. Push

Show Answer ⟶
a. Enqueue

52. Which of the following is true about stacks and queues?
a. Both allow random access
b. Both are linear data structures.
c. Both are non-linear data structures.
d. None of the above

Show Answer ⟶
b. Both are linear data structures.

53. The number of comparisons required for bubble sorting of an array of ‘n’ elements is _.
a. n(n-1)/2
b. n/2
c. log2 n
d. log10

Show Answer ⟶
n(n-1)/2

54. __ is the operation of rearranging the elements of an array either in increasing or decreasing order.
a. Searching

b. Sorting
c. Merging
d. None of the above

Show Answer ⟶
b. Sorting

Disclaimer: We have provide you with the accurate handout of “Data Structure MCQ“. If you feel that there is any error or mistake, please contact me at anuraganand2017@gmail.com. The above study material present on our websites is for education purpose, not our copyrights.

Images and content shown above are the property of individual organisations and are used here for reference purposes only. To make it easy to understand, some of the content and images are generated by AI and cross-checked by the teachers.

cbseskilleducation.com

Leave a Comment