Data Structures and Algorithms Multiple Choice Questions - Set 7

61.       To write fixed-length records, use file open mode:
(A) ios::app
(B) ios::ate
(C) ios::trunc
(D) ios::binary
Answer: D
62.       A complete Binary Tree with 15 nodes contains ................. edges
(A) 15
(B) 30
(C) 14
(D) 16
Answer: C
63.       If there is no base criteria in a recursive program, the program will ................
(A) not be executed
(B) execute until all conditions match
(C) execute infinitely
(D) obtain progressive approach
Answer: C
64.       The minimum number of comparisons required to find the largest number from 4 different numbers are
(A) 4
(B) 3
(C) 5
(D) 6
Answer: B
65.       Visiting root node after visiting left and right sub-trees is called .............
(A) In-order Traversal
(B) Pre-order Traversal
(C) Post-order Traversal
(D) None of these
Answer: C

66.       Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, membership, cardinality will be the slowest?
(A) union only
(B) intersection, membership
(C) membership, cardinality
(D) union, intersection
Answer: D
67.       An infix expression can be converted to a postfix expression using a .................
(A) Stack
(B) Queue
(C) Dequeue
(D) None of these
Answer: A
68.       A data structure in which an element is added and removed only from one end, is known as
(A) Queue
(B) Stack
(C) In-built structure
(D) None of the above
Answer: B
69.       A complete binary tree with the property that the value of each node is at least as large as the values of its children is known as ..............
(A) Binary Search Tree
(B) AVL Tree
(C) Heap
(D) Threaded Binary Tree.
Answer: C
70.    A sorting algorithm is stable if
(A) its time complexity is constant irrespective of the nature of input.
(B) preserves the original order of records with equal keys.
(C) its space complexity is constant irrespective of the nature of input.
(D) it sorts any volume of data in a constant time.
Answer: B

Post a Comment