A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

91. A three dimensional array in ‘C’ is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer):
a. &A[0][0][0]+w(y*z*q+z*p+r)
b. &A[0][0][0]+w(y*z*p+z*q+r)
c. &A[0][0][0]+w(x*y*p+z*q+r)
d. &A[0][0][0]+w(x*y*q+z*p+r)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).&A[0][0][0]+w(y*z*p+z*q+r)

92. In the following graph, discovery time stamps and finishing time stamps of Depth First Search (DFS) are shown as x/y where x is discovery time stamp and y is finishing time stamp.
It shows which of the following depth first forest?
Depth First Search
a. {a,b,e} {c,d,f,g,h}
b. {a,b,e} {c,d,h} {f,g}
c. {a,b,e} {f,g} {c,d} {h}
d. {a,b,c,d} {e,f,g} {h}
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).{a,b,e} {c,d,f,g,h}

93. The number of disk pages access in B-tree search, where h is height, n is the number of keys, and t is the minimum degree, is:
a. θ(logn h*t)
b. θ(logt n*h)
c. θ(logh n)
d. θ(logt n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).θ(logt n)

94. The inorder traversal of the following tree is:
inorder traversal
a. 2 3 4 6 7 13 15 17 18 18 20
b. 20 18 18 17 15 13 7 6 4 3 2
c. 15 13 20 4 7 17 18 2 3 6 18
d. 2 4 3 13 7 6 15 17 20 18 18
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).2 4 3 13 7 6 15 17 20 18 18

95. An ideal sort is an in-place-sort whose additional space requirement is ...............
a. O(log2n)
b. O(nlog2n)
c. O(1)
d. O(n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).O(1)

96. Loop unrolling is a code optimization technique:
a. that avoids tests at every iteration of the loop
b. that improves performance by decreasing the number of instructions in a basic block
c. that exchanges inner loops with outer loops
d. that reorders operations to allow multiple computations to happen in parallel
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).that avoids tests at every iteration of the loop

97. Match the following w.r.t. programming languages:

List - I                                     List – II
(a) JAVA                        (i) Dynamically object oriented
(b) Python                     (ii) Statically Non-object oriented
(c) Prolog                      (iii) Statically object oriented
(d) ADA                         (iv) Dynamically non-object oriented

Codes:
   (a)  (b)  (c)  (d)
a. (iii)  (i)   (ii)  (iv)
b. (i)   (iii)  (ii)  (iv)
c. (i)   (iii)  (iv) (ii)
d. (ii)  (iv)  (i)   (iii)
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).(ii)  (iv)  (i)   (iii)

98. In Activity-Selection problem, each activity i has a start time si and a finish time fi where si≤fi. Activities i and j are compatible if:
a. si≥fj
b. sj≥fi
c. si≥fj or sj≥fi
d. si≥fj and sj≥fi
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).si≥fj or sj≥fi

99. Floyd-Warshall algorithm utilizes ............... to solve the all-pairs shortest paths problem on a directed graph in ................ time.
a. Greedy algorithm, θ(V^3)
b. Greedy algorithm, θ(V^2 lgn)
c. Dynamic programming, θ(V^3)
d. Dynamic programming, θ(V^2 lgn)
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Dynamic programming, θ(V^3)

100. Let n=4 and (a1, a2, a3, a4) = (do, if, int, while). Let p(1:4) = (3/8, 3/8, 1/8, 1/8) and q(1:4) = (2/8, 3/8, 1/8, 1/8, 1/8) where p(i) and q(i) denotes the probability with which we search ai and the identifier x being searched satisfy ai < x < ai+1 respectively. The optimal search tree is given by:
optimal search tree
a. A
b. B
c. C
d. D
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).B