Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

The read access times and the hit ratios for different caches in a memory hierarchy are as given below:The read access time of main memory in 90 nanoseconds. Assume that the caches use the referred-word-first read policy and the writeback policy. Assume that all the caches are direct mapped caches. Assume that the dirty bit is always 0 for all the blocks in the caches. In execution of a program, 60% od memory reads are for instruction fetch and 40% are for memory operand fetch. The average read access time in nanoseconds (up to 2 decimal places) is _________Note: This question appeared as Numerical Answer Type.(A) 2.74(B) 4.72(C) 3.10(D) 2.67

Answer»
2.

Consider the following languages.L1 = {ap | p is a prime number}L2 = {anbmc2m | n >= 0, m >= 0}L3 = {anbnc2n | n >= 0}L4 = {anbn | n >= 1}Which of the following are CORRECT ?I. L1 is context free but not regular.II. L2 is not context free.III. L3 is not context free but recursive.IV. L4 is deterministic context free.(A) I, II and IV only(B) II and III only(C) I and IV only(D) III and IV only

Answer»
3.

Consider the following snippet of a C program. Assume that swap(&x, &y) exchanges the contents of x and y.int main(){ int array[] = {3, 5, 1, 4, 6, 2}; int done = 0; int i; while (done == 0) { done = 1; for (i = 0; i <= 4; i++) { if (array[i] = 1; i--) { if (array[i] > array[i-1]) { swap(&array[i], &array[i-1]); done = 0; } } } printf("%d", array[3]);}The output of the program is _____.Note: This question appeared as Numerical Answer Type.(A) 1(B) 2(C) 3(D) 4

Answer» None
4.

Consider the following function implemented in C:void printxy(int x, int y){ int *ptr; x = 0; ptr = &x; y = *ptr; *ptr = 1; printf("%d,%d", x, y);}The output of the printxy(1,1) is(A) 0,0(B) 0,1(C) 1,0(D) 1,1

Answer» None
5.

The minimum number of ordered pairs that need to be added to R to make (X, R) a lattice is _____.Note: This question appeared as Numerical Answer Type.(A) 0(B) 1(C) 2(D) 3

Answer» None
6.

If w, x, y, z are boolean variables, then which of the following in INCORRECT?(A) wx + w(x+y) + x(x+y) = x + wy(B) (wx'(y + z’))’ + w’x = w’ + x + y’z(C) (wx'(y + xz’) + w’x’)y = xy’(D) (w + y)(wxy + wyz) = wxy + wyz

Answer» None
7.

The pre-order traversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20.Then the post-order traversal of this tree is:(A) 2, 6, 7, 8, 9, 10, 12, 15, 16, 17, 19, 20(B) 2, 7, 6, 10, 9, 8, 15, 17, 20, 19, 16, 12(C) 7, 2, 6, 8, 9, 10, 20, 17, 19, 15, 16, 12(D) 7, 6, 2, 10, 9, 8, 15, 16, 17, 20, 19, 12

Answer»
8.

Which of the following is/are shared by all the threads in a process?I. Program CounterII. StackIII. Address spaceIV. Registers(A) I and II only(B) III only(C) IV only(D) III and IV only

Answer»
9.

Consider a machine with byte addressable memory of 232 bytes divided into blocks of size 32 bytes. Assume a direct mapped cache having 512 cache lines is used with this machine. The size of tag field in bits is _____(A) 12(B) 16(C) 18(D) 24

Answer»
10.

There are 3 red socks, 5 green socks and 3 blue socks. You choose 2 socks. The probability that they are of the same color is(A) 1/5(B) 7/30(C) 1/4(D) 16/55

Answer» None
11.

Match the following according to input(from the left column) to the compiler phase(in the right column) that process it:(A) P -> (ii), Q -> (iii), R -> (iv), S -> (i)(B) P -> (ii), Q -> (i), R -> (iii), S -> (iv)(C) P -> (iii), Q -> (iv), R -> (i), S -> (ii)(D) P -> (i), Q -> (iv), R -> (ii), S -> (iii)

Answer»
12.

Which of the following statements about the parser is/are correct?I. Canonical LR is more powerful than SLR.II. SLR is more powerful than LALR.III. SLR is more powerful than canonical LR.(A) I only(B) II only(C) III only(D) II and III only

Answer»
13.

An air pressure contour line join the locations in the region having the same atmospheric pressure. The following is the air pressure contour of a geographical region. The contour line are shown as 0.05 bar intervals in this plot.If the probability of thunderstorm is given by how fast air pressure rises or drops over a region. Which of the following region is most likely to have thunderstorm.(A) P(B) Q(C) R(D) S

Answer»
14.

The numbers of the roots of ex + 0.5x2 -2 = 0 in the range [-5, 5] are(A) 0(B) 1(C) 2(D) 3

Answer»
15.

Let p, q, r denote the statement “It is raining”, “It is cold”, and “It is pleasant”, respectively. Then the statement “It is not raining and it is pleasant, and it is not pleasant only if it is raining and it is cold” is represented by:(A) (¬ p ∧ r) ∧ ((¬ r → (p ∧ q))(B) (¬ p ∧ r) ∧ ((p ∧ q) → ¬ r)(C) (¬ p ∧ r) ∨ ((p ∧ q) → ¬ r)(D) (¬ p ∧ r) ∨ ((r → (p ∧ q))

Answer»
16.

“We lived in culture and denied any merit to literally works, Considering them important only when they were handmaidens to something seemingly more urgent – namely ideology. This was a country where all gestures even the most private , interpreted as political terms.”The author’s believes that ideology is not as important as literature is revealed by the word :(A) culture(B) seemingly(C) urgent(D) political

Answer»
17.

X is 30 digit number starting with 4 followed 7. Then number X3 will have(A) 90 digits(B) 91 digits(C) 92 digits(D) 93 digits

Answer» None
18.

There are three boxes, one contains apples, another contains oranges and last one contains both apples and oranges. All three are known to be incorrectly labelled. You are permitted to open just one box and then pull out and inspect only one fruit. Which box would you open to determine the contents of all three boxes?(A) The box labelled apples(B) The box labelled both apples and oranges(C) The box labelled oranges(D) can’t be determined

Answer»
19.

P and Q are considering to apply for job. The probability that p applies for job is 1/4. The probability that P applies for job given that Q applies for the job 1/2 and The probability that Q applies for job given that P applies for the job 1/3.The probability that P does not apply for job given that Q does not apply for the job .(A) 4/5(B) 5/6(C) 7/8(D) 11/12

Answer»
20.

If the ordinary generating function of a sequence is:then a3-a0 is equal to:(A) 8(B) 10(C) 15(D) 20

Answer» None
21.

Let L(R) be the language represented by regular expression R. Let L(G) be the language generated by a context free grammar G. Let L(M) be the language accepted by a Turing machine M. Which of the following decision problems are undecidable?I. Given a regular expression R and a string w, is w∈L(R)?II. Given a context-free grammar G, is L(G)=∅III. Given a context-free grammar G, is L(G)=Σ∗ for some alphabet Σ?IV. Given a Turing machine M and a string w, is w ∈ L(M)?(A) I and IV only(B) II and III only(C) II, III and IV only(D) III and IV only

Answer»
22.

A Circular queue has been implemented using singly linked list where each node consists of a value and a pointer to next node. We maintain exactly two pointers FRONT and REAR pointing to the front node and rear node of queue. Which of the following statements is/are correct for circular queue so that insertion and deletion operations can be performed in O(1) i.e. constant time.I. Next pointer of front node points to the rear node.II. Next pointer of rear node points to the front node.(A) I only(B) II only(C) Both I and II(D) Neither I nor II

Answer»
23.

Given the following binary number in 32 bit (single precision) IEEE-754 format:00111110011011010000000000000000The decimal value closest to this floating-point number is:(A) 1.45 X 101(B) 1.45 X 10-1(C) 2.27 X 10-1(D) 2.27 X 101

Answer» None