MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
If a binary tree of depth is d , then when can we say that it is an almost complete binary tree? |
| A. | Each leaf in the tree is either at level d or at level d 1 . |
| B. | For any node n in the tree with a right descendent at level d all the left descendants of n that are leaves, are also at level d . |
| C. | Both A and B. |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 2. |
If ' h ' is a hashing function and it is used to hash ' n ' keys into a table of size ' m 'where n |
| A. | less than 1. |
| B. | less than n. |
| C. | less than m. |
| D. | less than n / 2. |
| Answer» B. less than n. | |
| 3. |
What time is required for deleting a node ' x ' from a Doubly Linked List whose having ' n ' nodes? |
| A. | O (n) |
| B. | O (log n) |
| C. | O (1) |
| D. | O (n log n) |
| Answer» D. O (n log n) | |
| 4. |
What is the postfix form of the following prefix expression? A / B * C $ DE |
| A. | ABCDE $ * / - |
| B. | A - BCDE $ * / - |
| C. | ABC $ ED * / - |
| D. | A - BCDE $ * / |
| Answer» B. A - BCDE $ * / - | |
| 5. |
Which of the following is the depth of a Complete Binary Tree? |
| A. | Dn = n log2n |
| B. | Dn = n log2n + 1 |
| C. | Dn = log2n |
| D. | Dn = log2n + 1 |
| Answer» E. | |
| 6. |
Which of the following sorting methods would be most suitable for sorting a list? |
| A. | Bubble Sort |
| B. | Insertion Sort |
| C. | Selection Sort |
| D. | Quick Sort |
| Answer» B. Insertion Sort | |
| 7. |
In graphs, A hyperedge is an edge that is allowed to take on any number of _____________. |
| A. | vertices |
| B. | edges |
| C. | both a and b |
| D. | labels |
| Answer» B. edges | |
| 8. |
A Vertex comprising only incoming edges without any outgoing edges, specifically known as _________. |
| A. | Source |
| B. | Sink |
| C. | Isolated |
| D. | None of the above. |
| Answer» C. Isolated | |
| 9. |
Which graph consists of an unordered pair of vertices representing the similar edge? (Data Structure) |
| A. | Directed Graph |
| B. | Undirected Graph |
| C. | Both a & b |
| D. | None of the above |
| Answer» C. Both a & b | |
| 10. |
A path in which all the vertices are distinct excluding the initial and final vertices is known as _________. (Data Structure) |
| A. | Simple |
| B. | Compound |
| C. | Complex |
| D. | Distinct |
| Answer» B. Compound | |
| 11. |
Which graphs are distinctively known by the existence of a path between every pair of its vertices? |
| A. | Weighted graphs |
| B. | Connected graphs |
| C. | Subgraphs |
| D. | Multigraphs |
| Answer» C. Subgraphs | |
| 12. |
Which algorithm specifies the addition of edges to the Spanning Tree in an increasing order of cost? |
| A. | Prim's Algorithm |
| B. | Kruskal's Algorithm |
| C. | Both a & b |
| D. | None of the above |
| Answer» C. Both a & b | |
| 13. |
How many nested loops are present in Prim's Algorithm? |
| A. | Two |
| B. | Three |
| C. | Four |
| D. | Infinite |
| Answer» B. Three | |
| 14. |
Which among the below mentioned graph elements represents a simple path that begins and terminates at the same vertex? |
| A. | Path |
| B. | Cycle |
| C. | Node |
| D. | Edge |
| Answer» C. Node | |
| 15. |
Which value of degree is specified / defined for an Isolated Vertex? |
| A. | Zero |
| B. | One |
| C. | Infinity |
| D. | Unpredictable |
| Answer» B. One | |
| 16. |
Which Vertex exhibits its In - degree and Out - degree to be ' 1 ' & ' 0 ' respectively? |
| A. | Pendant Vertex |
| B. | Isolated Vertex |
| C. | Cut-Vertex |
| D. | Labeled Vertex |
| Answer» B. Isolated Vertex | |
| 17. |
Which of the following techniques represents the precise sequence of an In - Order Traversal of a Binary Tree? |
| A. | Visit the Root, Traverse Left Subtree, Traverse Right Subtree |
| B. | Traverse Left Subtree, Visit the Root, Traverse Right Subtree |
| C. | Traverse Left Subtree, Traverse Right Subtree, Visit the Root |
| D. | None of the Above |
| Answer» C. Traverse Left Subtree, Traverse Right Subtree, Visit the Root | |
| 18. |
When is the pop operation on Stack considered to be an error? |
| A. | Only when the stack is empty |
| B. | Only when the stack is full |
| C. | When the stack is neither empty nor full |
| D. | Cannot be predicted |
| Answer» B. Only when the stack is full | |
| 19. |
Which is the correct sequential order of constructing a binary tree for the expression a + b * c + d * e?A. Moving the operator at the center of the group.B. Inversion of the Structure.C. Grouping of elements as per the sequence of Evaluation. |
| A. | A, B, C |
| B. | B, C, A |
| C. | B, A, C |
| D. | C, A, B |
| Answer» E. | |
| 20. |
Which value is assigned to leaf of game tree if the board position corresponds to the ' draw ' result for the player? |
| A. | 1 |
| B. | 0 |
| C. | -1 |
| D. | None of the above |
| Answer» C. -1 | |
| 21. |
Which balance factor is stored in the new field introduced by an AVL tree for the representation of a node? |
| A. | Length |
| B. | Height |
| C. | Width |
| D. | Information |
| Answer» C. Width | |
| 22. |
How is an insertion of a node into an AVL tree carried out? |
| A. | By treating an AVL tree as a binary search tree |
| B. | By updating the balance factors working upward from insertion point to the root |
| C. | Both a & b |
| D. | None of the Above |
| Answer» D. None of the Above | |
| 23. |
What happens if an expression tree reads the symbol in the form of an Operand? |
| A. | One node tree is created and a pointer is pushed towards it on the stack. |
| B. | Pointer is pop to two trees in order to generate a new tree with root as its operator. |
| C. | Both a & b |
| D. | None of the Above |
| Answer» B. Pointer is pop to two trees in order to generate a new tree with root as its operator. | |
| 24. |
What does the push operation top = top +1 indicate while representing the stack in one - dimensional array? |
| A. | Stack Growing |
| B. | Stack Shrinking |
| C. | Stack Stability |
| D. | Stack Instability |
| Answer» B. Stack Shrinking | |
| 25. |
Which direction of scanning is suitable for the evaluation of a prefix expression? |
| A. | Left to Left |
| B. | Right to Right |
| C. | Left to Right |
| D. | Right to Left |
| Answer» E. | |
| 26. |
Which linear structure has a provision of Last-In-First-Out (LIFO) mechanism for its elements? |
| A. | Stack |
| B. | Queue |
| C. | Both a & b |
| D. | None of the above |
| Answer» B. Queue | |
| 27. |
How are the elements with the same priority get processed according to the Priority Queue mechanism? |
| A. | Before the processing of other elements with lower priority |
| B. | After the processing of other elements with highest priority |
| C. | On the basis of 'First-Come-First Served' priority |
| D. | None of the Above |
| Answer» D. None of the Above | |
| 28. |
Which kind of Special Vertex is not required while treating a Tree as a Graph? |
| A. | Branch |
| B. | Node |
| C. | Root |
| D. | None of the above |
| Answer» D. None of the above | |
| 29. |
Which algorithm should not be used for a Dense Graph? |
| A. | Prim's algorithm |
| B. | Kruskal's algorithm |
| C. | Both a & b |
| D. | None of the above |
| Answer» C. Both a & b | |
| 30. |
The concept of topological sorting significantly deals with an ordering of Vertices in_________. |
| A. | A Directed Cyclic Graph |
| B. | An Undirected Cyclic Graph |
| C. | A Directed Linear Graph |
| D. | An Undirected Linear Graph |
| Answer» B. An Undirected Cyclic Graph | |
| 31. |
How many edges are present in a Complete Graph with ' N ' Vertices? |
| A. | N - 1 |
| B. | N - 1 / 2 |
| C. | N ( N - 1 ) / 2 |
| D. | ( N - 1 ) |
| Answer» D. ( N - 1 ) | |
| 32. |
Which of the following is / are the Applications of a Linked List? |
| A. | Polynomial |
| B. | Set |
| C. | Sparse matrix |
| D. | All of the above |
| Answer» E. | |
| 33. |
Which is the most suitable construct utilized for traversing in a Circular Linked List? |
| A. | do - while |
| B. | while |
| C. | if |
| D. | for |
| Answer» B. while | |
| 34. |
What will happen if the node to be deleted is the last node pointed by ' p ' in a Doubly Linked List? |
| A. | Head will be advanced to next node |
| B. | No node will be present to its right |
| C. | Both a & b |
| D. | None of the above |
| Answer» C. Both a & b | |
| 35. |
Doubly Linked List is especially applicable, for which of the following implementation? |
| A. | Double Ended Queue |
| B. | Linear List of Integers |
| C. | Variable Length String Data Structure |
| D. | All of the Above |
| Answer» E. | |
| 36. |
How many elements are present in the stack if the variable top exhibits pointing towards the topmost element in the Array? |
| A. | top +1 |
| B. | top - 1 |
| C. | zero |
| D. | infinite |
| Answer» B. top - 1 | |
| 37. |
Which is the correct algorithmic sequence for the conversion of an expression from Infix to Prefix?A. Change of every '(' (opening bracket) by ')' (closing bracket) and vice-versa.B. Reversal of an infix expression.C. Conversion of the modified expression into postfix form.D. Reversal of postfix expression. |
| A. | A, B, C, D |
| B. | C, A, D, B |
| C. | B ,A, C, D |
| D. | D, B, A, C |
| Answer» D. D, B, A, C | |
| 38. |
What should be the growing direction of two stacks while implementing them in a similar array so as to reduce the overflow chances? |
| A. | Forward |
| B. | Backward |
| C. | Opposite |
| D. | None of the above |
| Answer» D. None of the above | |
| 39. |
Which expressions are also regarded as ' Reverse Polish Notations '? |
| A. | Prefix |
| B. | Postfix |
| C. | Infix |
| D. | All of the above |
| Answer» C. Infix | |
| 40. |
Which step is associated with an initialization process while converting a recursive into non - recursive algorithm? |
| A. | Declaration of Stack |
| B. | Pushing of all local variables and parameters into the stack |
| C. | Assigning the values of formal parameters |
| D. | Popping of return address |
| Answer» B. Pushing of all local variables and parameters into the stack | |
| 41. |
Which data structures find their applications in BFS and DFS Traversal mechanisms on a Tree respectively? |
| A. | Graph & Stack |
| B. | Queue & Stack |
| C. | Queue & Graph |
| D. | None of the Above |
| Answer» C. Queue & Graph | |
| 42. |
Which function plays an important role in returning the address of memory block allocated to locate / storea node especially while declaring ' top ' in the linked representation of the Stack? |
| A. | galloc () |
| B. | falloc () |
| C. | malloc () |
| D. | calloc () |
| Answer» D. calloc () | |
| 43. |
Stacks do not find their applicability for ____________. |
| A. | Simplification of an arithmetic expression in postfix form |
| B. | Recursion Implementation |
| C. | Conversion of Infix to its equivalent Postfix Form |
| D. | Allocation of Resources by an Operating System |
| Answer» E. | |
| 44. |
Data Structure: A complete binary tree with the property that key value in any node is greater than or equal to the key values in both its children is called as. |
| A. | Binary search tree |
| B. | Threaded binary tree |
| C. | Heap |
| D. | AVL tree |
| Answer» D. AVL tree | |
| 45. |
Data Structure: Which amongst the following cannot be a balance factor of any node of an AVL tree? |
| A. | 0 |
| B. | 1 |
| C. | 1 |
| D. | 2 |
| Answer» E. | |
| 46. |
Data Structure: Preorder and in order of a tree is give Preorder ----- A B D H E C F I G J KInorder -------- D H B E A I F C J G KWhat will be the postorder? |
| A. | H D E B I F J K G C A |
| B. | H D E B F I J K G C A |
| C. | H D E B I F J K CG A |
| D. | None of the above. |
| Answer» B. H D E B F I J K G C A | |
| 47. |
Data Structure: K4 and K3 are graphs with the following structure.Which one of the following statements is TRUE in relation to these graphs? |
| A. | K4 is planar while Q3 is not |
| B. | Q3 is planar while K4 is not |
| C. | Both K4 and Q3 are planar |
| D. | Neither K4 nor Q3 is planar |
| Answer» D. Neither K4 nor Q3 is planar | |
| 48. |
Data Structure: What is the infix version of the following postfix expression? x 12 + z 17 y + 42 * / + |
| A. | x + 12 + z / 17 + y * 42 |
| B. | x + 12 + z / ((17 + y) * 42) |
| C. | (x + 12 + z) / (17 + y * 42) |
| D. | None of the above. |
| Answer» C. (x + 12 + z) / (17 + y * 42) | |
| 49. |
Which strategy of memory allocation yields the smallest free block size greater than or equal to the requested size? |
| A. | First - fit |
| B. | Best - fit |
| C. | Worst - fit |
| D. | Next - fit |
| Answer» C. Worst - fit | |
| 50. |
What do the leaves of an expression tree represent? |
| A. | Operand |
| B. | Operator |
| C. | Operation |
| D. | All of the Above |
| Answer» B. Operator | |