# Data Structure MCQ With Answer

Teachers and Examiners (CBSESkillEduction) collaborated to create the Data Structure MCQ. Al the important Information are taken from the NCERT Textbook Data Structure.

Contents

## Data Structure MCQ With Answer

1. The computer system is used essentially as data manipulation system where __________ are very important things for it.
a. Data
b. Data Strucutre
c. Program
d. None of the above

a. Data

2. Representation of data can be in forms of _________.
a. Raw data
b. Data item
c. Data structures
d. All of the above

d. All of the above

3. Which of the following algorithms is used to solve problems involving pattern and string matching?
a. Robin Karp Algorithm
b. Z Algorithm
c. KMP Algorihtm
d. All of the above

d. All of the above

4. A __________ is a physical implementation that clearly defiens a way of storing, accessing, manipulating data stored in a data strucutre.
a. Data Structure
b. Data Program
c. Data Storage
d. None of the above

a. Data Structure

5. Which of the following algorithms uses a Divide and Conquer algorithm?
a. Merge Sort
b. Bubble Sort
c. Quick Sort
d. None of the above

a. Merge Sort

6. ___________ data strucutres are normally built from primitive data types like integers, reals, characters, boolean.
a. Simple Data Strucutre
b. Compound Data Strucutre
c. Both a) and b)
d. None of the above

a. Simple Data Strucutre

7. Simple data structures can be combined in various ways to form more complex strucutes called ____________.
a. Simple Data Strucutre
b. Compound Data Strucutre
c. Both a) and b)
d. None of the above

b. Compound Data Strucutre

8. Example of Linear data structrues are _____________.
a. Stack
b. Queue
d. All of the above

d. All of the above

9. Example of Non-linear data strucutre are _________.
a. Stack & Queue
c. Tree
d. All of the above

c. Tree

10. _________ refer to a named list of a finite number n of similar data elements.
a. Linear List
b. Arrays
c. Both a) and b)
d. None of the above

c. Both a) and b)

11. Arrays can be ___________.
a. One dimensional
b. Two dimensional
c. Multi dimensional
d. All of the above

d. All of the above

12. _________ data strucutres refer to the lists stored and accessed in a special way, Where LIFO (Last in first out) technique is followed.
a. Stacks
b. Queue
d. None of the above

a. Stacks

13. __________ data strucutres are FIFO (First in First out) lists, where insertions take place at the “rear” end of the queues and deletions take palce at the “front” end of the queues.
a. Stacks
b. Queue
d. None of the above

b. Queue

14. _________ lists are special lists of some data elements linked to one another. The logical ordering is represented by having each element pointing to the next element.
a. Stacks
b. Queue
d. None of the above

15. Trees are multilevel data strucutre having a hierarchical relationship among its elements called ________.
a. Node
b. Reference
d. None of the above

a. Node

16. Which one of the following is not a type of queue?
a. Single – ended queue
b. Circular queue
c. Priority queue
d. Ordinary queue

a. Single – ended queue

17. Which of the following does not represent a data structure operation?
a. Operations that manipulate data in some way
b. Operations that perform a computation
c. Operations that monitor an object for the occurrence of a controlling event
d. Operations that check for syntax errors

a. Operations that manipulate data in some way

18. What are the basic operations that are performed on data structures _________.
a. Insertion
b. Deletion
c. Searching
d. All of the above

d. All of the above

19. When elements of linear strucutes are homogeneous and are represented in memory by means of sequentional momoey location, these linear strucures are called _________.
a. String
b. Arrays
c. List
d. None of the above

b. Arrays

20. What data structure is necessary to change infix notation into prefix notation?
a. Stack
c. Binary tree
d. Queue

a. Stack

21. If the stack is implemented using a linked list, which of the following nodes is considered as the top of the stack?
a. First node
b. Second node
c. Last node
d. None of the above

a. First node

22. Linear List or Arrarys are one of the simplest data strucures and are very easy to _________.
a. Traverse
b. Search
c. Sort
d. All of the above

d. All of the above

23. What are the different searching algorithms in Data structre.
a. Linear Search
b. Binary Search
c. Both a) and b)
d. None of the above

c. Both a) and b)

24. In the ________ search, each element of the array list is compared with the given item to be searched for, One by One.
a. Linear search
b. Sequential search
c. Both a) and b)
d. None of the above

c. Both a) and b)

25. In _________ search, the ITEM is searched for in smaller segment (nearly half the previous segment) after every stage.
a. Linear serach
b. Sequential search
c. Binary serach
d. None of the above

c. Binary serach

26. The __________ refers to arranging elements of a list in ascending or descending order.
a. Order wise
b. Sorting
c. Algorithms
d. None of the above

b. Sorting

27. What are the advantages of list comprehensions in Python.
a. Code reduction
b. Faster code processing
c. Both a) and b)
d. None of the above

c. Both a) and b)

28. What is the maximum number of swaps that can be performed in the Selection Sort algroithm?
a. n – 2
b. n
c. n + 2
d. n – 1

d. n – 1

29. The condition is known as___ if the stack has a size of 10 and we attempt to add the 11th element to it.
a. Underflow
b. Garbage collection
c. Overflow
d. None of the above

c. Overflow

30. Which data structure is mostly used in the recursive algorithm’s implementation?
a. Queue
b. Stack
c. Binary tree

b. Stack

31. What data structures from the list below can be utilised to implement queues?
a. Stack
c. Arrays
d. All of the above

d. All of the above

32. What do you mean by code reduction.
a. A code of 3 or more lines gets reduced to a single line of code
b. A code of 3 or more lines converted into a multiple lines
c. Both a) and b)
d. None of the above

a. A code of 3 or more lines gets reduced to a single line of code

33. If you want to create 2D list by inputting element by element, you can employ a ____________ loop.
a. Single loop
b. Nested loop
c. Both a) and b)
d. None of the above

b. Nested loop

34. Which of the following sorting algorithms, in the worst-case situation, offers the best temporal complexity?
a. Quick Sort
b. Bubble Sort
c. Merge Sort
d. None of the above

c. Merge Sort

35. A ____________ is a named group of data of different data types which can be processed as a single unit.
a. Data Type
b. Data Strucutre
c. Data Item
d. None of the above

b. Data Strucutre

36. ________ data sturctre are normally built from primitive data types.
a. Simple
b. Compound
c. Both a) and b)
d. None of the above

a. Simple

37. When an empty queue receives a pop() request. What is the name of the condition?
a. Underflow
b. Overflow
c. Peek
d. None of the above

a. Underflow

38. ___________ data structure may be linear and no-linear.
a. Simple
b. Compound
c. Both a) and b)
d. None of the above

b. Compound

39. What data structure from the list below is used in recursion?
a. Stack
c. Arrays
d. Queues

a. Stack

40. Which of the following data structures allows for both end-to-end insertion and deletion?
a. Stack
b. Queue
c. Deque
d. None of the above

c. Deque

41. In an n-ary tree, how many kids can a node have at once?
a. Infinite node
b. 3
c. 2
d. 0

a. Infinite node

42. A __________ referes to a named list of a finite number n of similar data elements whereas a structure refers to a named collection of variables of different data types.
a. Linear List
b. Arrays
c. Both a) and b)
d. None of the above

c. Both a) and b)

43. Stacks are __________ lists where insertions and deletions take place only at one end.
a. LIFO (Last in First Out)
b. FIFO (First in First Out)
c. Both a) and b)
d. None of the above

a. LIFO (Last in First Out)

44. What are the drawbacks of the array data structure?
a. Elements of an array can be sorted
b. Easier to access the elements in an array
c. Elements of mixed data tyeps can be stored
d. Index of the first element starts from 0

c. Elements of mixed data tyeps can be stored

45. Queues are __________ lists where insertions take place at “rear” end and deletions take place at the “front” end.
a. LIFO (Last in First Out)
b. FIFO (First in First Out)
c. Both a) and b)
d. None of the above

b. FIFO (First in First Out)

46. In __________, each element of the array is compared with the given item to be searched for, one by one.
a. Linear search
b. Binary search
c. Both a) and b)
d. None of the above

a. Linear search

47. A ___________ is a concise description of a list that shorthands the list creating for loop in the form of a single statement.
a. List Comprehension
b. Queues Comprehension
c. Both a) and b)
d. None of the above

a. List Comprehension

48. What type of data is required to be stored by a LinkedList’s Node?
a. The value of the current node
b. The address of the next node
c. Both a) and b)
d. None of the above

c. Both a) and b)

49. Stack is a list of data that follows ___________ rules.
a. Data can only be removed from the top
b. A new data element can only be added to the top of the stack.
c. Both a) and b)
d. None of the above

c. Both a) and b)

50. How is a string stored in memory?
a. The Object of some class
b. An array of characters
c. Same as other primitive data types

b. An array of characters

51. _________ refers to inspecting the value at the stack’s top without removing it. It is also sometimes referred as inspection.
a. Peek
b. Overflow
c. Underflow
d. None of the above

a. Peek

52. What is the binary search algorithm’s time complexity?
a. O(n^2)
b. O(n)
c. O(1)
d. O(log2n)

d. O(log2n)

53. ________ refers to situation (ERROR) when one tries to push an item in stack that is full.
a. Peek
b. Overflow
c. Underflow
d. None of the above

b. Overflow

54. What are the disadvantages of the array data structure?
a. Elements of an array can be accessed in constant time
b. The amount of memory to be allocated should be known beforehand
c. Multiple other data strucutre can be implementd using arrays.
d. Elements are stored in contiguous memory blocks

b. The amount of memory to be allocated should be known beforehand

55. _________ refers to situation (ERROR) when one tries to pop/delete an item from an empty stack.
a. Peek
b. Overflow
c. Underflow
d. None of the above