Top 350+ Solved Data Structures (DS) MCQ Questions Answer
Q. When does the ArrayIndexOutOfBoundsException occur?
a. Compile-time
b. Run-time
c. Not an error
d. None of the mentioned
Q. The depth of a complete binary tree is given by__________.
a. Dn = n log2n.
b. Dn = n log2n+1.
c. Dn = log2n.
d. Dn = log2n+1.
Q. When converting binary tree into extended binary tree, all the original nodes in binary treeare___________.
a. internal nodes on extended tree.
b. external nodes on extended tree.
c. vanished on extended tree.
d. post order traversal.
Q. Which of the following conditions checks available free space in avail list?
a. Avail=Top
b. Null=Avail
c. Avail=Null
d. Avail=Max stack
Q. Which of the following sorting algorithm is of divide-and-conquer type?
a. Bubble sort.
b. Insertion sort.
c. Quick sort.
d. Algorithm.
Q. Collection of related data items is called _______.
a. files
b. fields
c. attributes.
d. records.
Q. Breadth First search is used in____________.
a. binary tree.
b. stacks.
c. graphs.
d. both a and c.
Q. A variable whose size is determined at compile time and cannot be changed at run time is_________.
a. static variable.
b. dynamic variable.
c. not a variable.
d. data variable.
Q. Process of inserting an element in stack is called ____________.
a. Create
b. Push
c. Evaluation
d. Pop
Q. Length of linear array can be found by using the formula_________
a. UB-LB+1
b. LB+UB
c. LB-UB
d. LB-UB+1
Q. The average number of key comparisons done in a successful sequential search in a list of length nis___________.
a. log n
b. n-1/2.
c. n/2.
d. n+1/2.
Q. A technique for direct search is _______________.
a. Binary Search
b. Linear Search
c. Tree Search
d. Hashing
Q. Base address is the address of __________.
a. first element
b. middle element
c. last element
d. pivot element
Q. A _____________ list is a list where the last node contains null pointer.
a. circular header.
b. grounded header.
c. rounded header.
d. linked header.