Data Structure
MCQ questions and answers
- 4.5/5.0
- 1k Enrolled
- All levels
- Last updated 11/2023
- English
Data Structure MCQ (49)
1. | _____ is a collection of the similar data elements? |
A | Pointer |
B | Structure |
C | Array |
D | Class |
Answer: C | |
2. | _____ is a collection of elements which combine the different data types? |
A | Structure |
B | Pointer |
C | Array |
D | None of these |
Answer: A | |
3. | Which variable is used to hold the address of a another variable? |
A | Array |
B | Pointer |
C | Void |
D | Object |
Answer: B | |
4. | _____ is a particular way of organizing data in a computer so that it can be used effectively. |
A | Database |
B | Structure |
C | Object |
D | Data structure |
Answer: D | |
5. | ______ is a primitive data type(s). |
A | int |
B | float |
C | pointer |
D | all of the above |
Answer: D | |
6. | ______ is a non-primitive data structure. |
A | Array |
B | Graphs |
C | Statck |
D | All of the above |
Answer: D | |
7. | __________ is an ordered collection of an item whereas a new item can be inserted or deleted at one end. |
A | Stack |
B | Queue |
C | Binary tree |
D | B+ tree |
Answer: A | |
8. | Which policy is used by the stack? |
A | FIFO |
B | LILO |
C | LIFO |
D | FILO |
Answer: C | |
9. | What is the correct order of a postfix expression? |
A | Operand 1, Operator, Operand 2. |
B | Operand 1, Operand 2, Operator. |
C | Operator, Operand 1, Operand 2. |
D | None of these. |
Answer: B | |
10. | What is the correct order of a prefix expression? |
A | Operator, Operand 1, Operand 2. |
B | Operand 1, Operand 2, Operator. |
C | Operand 1, Operator,Operand 2. |
D | none of these |
Answer: A | |
11. | Convert this expression A+B-C into the prefix expression. |
A | – + ABC |
B | AB + C – |
C | – AB + C |
D | – A + BC |
Answer: A | |
12. | Convert the A+B – C into the postfix expression. |
A | – + ABC |
B | – A + BC |
C | – AB + C |
D | AB + C – |
Answer: D | |
13. | Convert the expression (A+B)*(C – D) into the prefix expression. |
A | * + AB – CD |
B | AB + CD – * |
C | * AB +CD – |
D | ABCD – * + |
Answer: A | |
14. | Convert the expression (A+B)*(C – D) into the postfix. |
A | * + AB – CD |
B | * AB + – CD |
C | AB + CD – * |
D | * AB + CD – |
Answer: C | |
15. | __________ is an ordered collection of items whereas the item may be inserted at one end and deleted at another end. |
A | Stack |
B | Queue |
C | B+ tree |
D | Array |
Answer: B | |
16. | Which data structure uses the principle of FIFO? |
A | Stack |
B | Queue |
C | Binary Search Tree |
D | Graph |
Answer: B | |
17. | __________ uses the array to overcome the problem of an unutilized space in the linear queue. |
A | link list |
B | priority queue |
C | circular queue |
D | doubly link list |
Answer: C | |
18. | __________ queue is a typically implemented using heap data structure and it is associated with an order. |
A | input restriction |
B | priority queue |
C | output restriction |
D | linear queue |
Answer: B | |
19. | Which pointer signal is used represent the end of the list? |
A | Start |
B | Node |
C | Null |
D | \n |
Answer: C | |
20. | The next field in the last node containss a pointer back to first node rather than null pointer such list is known as __________. |
A | singly link list |
B | doubly link list |
C | circular list |
D | none |
Answer: C | |
21. | ____ is composed of different terms where each of them holds a coefficient and an exponent. |
A | Polynomials |
B | Linear list |
C | B+ tree |
D | Graphs |
Answer: A | |
22. | Which linked list is used to maintain the two links of the previous node and next node? |
A | Singly link list |
B | Doubly link list |
C | Queue |
D | Tree |
Answer: B | |
23. | Which data structure is a nonlinear data structure? |
A | Array |
B | Linked list |
C | Queue |
D | Tree |
Answer: D | |
24. | In a tree data structure, the ___ node is the very first or parent node |
A | Parent node |
B | Internal node |
C | Root node |
D | Sibling |
Answer: C | |
25. | Which node is having the degree 0 and also called as a terminal node? |
A | Leaves |
B | Root |
C | Parent |
D | Ancestors |
Answer: A | |
26. | What is the level of root node? |
A | Zero |
B | One |
C | Two |
D | Ten |
Answer: A | |
27. | _____ is also known as an inner node, inode for short, or branch node. |
A | Sibling |
B | External node |
C | Internal node |
D | Parent node |
Answer: C | |
28. | _______ is an important class of a tree data structure in which a node can have at most two children. |
A | Binary tree |
B | BST |
C | Strictly Binary Tree |
D | All of the above |
Answer: A | |
29. | Tree can be traversed in __________ orders. |
A | inorder |
B | preorder |
C | postorder |
D | all of the above |
Answer: D | |
30. | Inorder traversal of __________ tree will result in the elements are arranged in an ascending order. |
A | B+ tree |
B | Spanning tree |
C | Binary Search Tree |
D | None of these |
Answer: C | |
31. | The process of arranging data in analphabetical or numerical order is called __________. |
A | Sorting |
B | Searching |
C | Traversal |
D | Merging |
Answer: A | |
32. | which searching algoritm starts from the first element of an array. |
A | serial |
B | random |
C | parallal |
D | binary |
Answer: A | |
33. | Which data structure includes the set of vertices and edge? |
A | Tree |
B | Graph |
C | Sorting |
D | Queue |
Answer: B | |
34. | Which of the following graph traversal techniques are used for accessing all of the nodes? |
A | BFS, inorder |
B | DFS, sorting |
C | BFS, DFS |
D | pop, push |
Answer: C | |
35. | Which algorithm is also known as the shortest pathfinding algorithm? |
A | Dijkstra algorithm |
B | De-morgan |
C | prim algorithm |
D | all of the above |
Answer: A | |
36. | ____ is used to solve a problem in step by step procedure. |
A | Flowchart |
B | Algorithm |
C | Program |
D | Software |
Answer: B | |
37. | The ____ complexity of the algorithm is the function defined by the minimum number of steps taken on any instance of size n |
A | Normal case |
B | Worst case |
C | Average case |
D | Best case |
Answer: D | |
38. | The ______ complexity of the algorithm is the function defined by the maximum number of steps taken on any instance of size n. |
A | Normal case |
B | Worst case |
C | Average case |
D | Best case |
Answer: B | |
39. | ____ asymptotic notation is the formal method of expressing the upper bound of the running time of an algorithm? |
A | Big -O |
B | Little -o |
C | Omega |
D | Little Omega |
Answer: A | |
40. | Which notation represents the loose bounding version of a Big – O g(n) which bounds from the top, but it does not bound from the bottom? |
A | Big -O |
B | Small -o |
C | Big Omega |
D | none of these |
Answer: B | |
41. | Which sorting method is called as a diminishing increment sorting method? |
A | Bubble sort |
B | Insertion sort |
C | Shell sort |
D | Quick sort |
Answer: C | |
42. | In _____ complete binary tree, the value of each node is grater than or equal to the value of its children? |
A | Max heap |
B | Min heap |
C | B+ |
D | Spanning Tree |
Answer: A | |
43. | __________ or __________ are a method which can be used to sort a list of the element by its base value. |
A | Radix, Bucket sort |
B | Radix, Quick sort |
C | Bucket sort, Quick sort |
D | none of these |
Answer: A | |
44. | AVL stands for? |
A | Adelson-Vector and Landis, |
B | Adelson-Velskii and Landis, |
C | Adelson-Velskii and Levis |
D | None |
Answer: B | |
45. | ______ is a self-balanced search tree in which every node contains multiple keys and has more than two children |
A | B – tree of order n |
B | Multiway search tree |
C | Binary Search Tree |
D | AVL tree |
Answer: A | |
46. | _____ is an extension of B Tree which allows efficient insertion, deletion and search operations |
A | BST |
B | AVL |
C | B+ Tree |
D | Spinning Tree |
Answer: C | |
47. | Which sorting techniques are divide the array into the sorted and unsorted sub list? |
A | Selection |
B | Bubble |
C | Insertion |
D | All of the above |
Answer: D | |
48. | What is an index value of the 8th element of an array? |
A | 7 |
B | 8 |
C | 9 |
D | 6 |
Answer: A | |
49. | What is the value of the first subscript of an array? |
A | Zero |
B | One |
C | Null |
D | None |
Answer: A |