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.

Which of the following statements are TRUE?1. The problem of determining whether there exists a cycle in an undirected graph is in P.2. The problem of determining whether there exists a cycle in an undirected graph is in NP.3. If a problem A is NP-Complete, there exists a non-deterministic polynomial time algorithm to solve A. (A) 1, 2 and 3(B) 1 and 2 only(C) 2 and 3 only(D) 1 and 3 only

Answer»
2.

What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?(A) A(B) B(C) C(D) D

Answer»
3.

In a k-way set associative cache, the cache is divided into v sets, each of which consists of k lines. The lines of a set are placed in sequence one after another. The lines in set s are sequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards. The main memory block numbered j must be mapped to any one of the cache lines from.(A) (j mod v) * k to (j mod v) * k + (k-1)(B) (j mod v) to (j mod v) + (k-1)(C) (j mod k) to (j mod k) + (v-1)(D) (j mod k) * v to (j mod k) * v + (v-1)

Answer»
4.

Consider the following sequence of micro-operations. MBR ← PC MAR ← X PC ← Y Memory ← MBRWhich one of the following is a possible operation performed by this sequence?(A) Instruction fetch(B) Operand fetch(C) Conditional branch(D) Initiation of interrupt service

Answer»
5.

Suppose p is the number of cars per minute passing through a certain road junction between 5 PM and 6 PM, and p has a Poisson distribution with mean 3. What is the probability of observing fewer than 3 cars during any given minute in this interval?(A) 8 / (2e3)(B) 9 / (2e3)(C) 17 / (2e3)(D) 26 / (2e3)

Answer»
6.

Out of all the 2-digit integers between 1 and 100, a 2-digit number has to be selected at random. What is the probability that the selected number is not divisible by 7?(A) 13/90(B) 12/90(C) 78/90(D) 77/90

Answer»
7.

Complete the sentence:Universalism is to particularism as diffuseness is to _________________(A) specificity(B) neutrality(C) generality(D) adaptation

Answer»
8.

The smallest integer that can be represented by an 8-bit number in 2’s complement form is(A) -256(B) -128(C) -127(D) 0

Answer»
9.

A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W and X reads x from memory, increments by one, stores it to memory, and then terminates. Each of the processes Y and Z reads x from memory, decrements by two, stores it to memory, and then terminates. Each process before reading x invokes the P operation (i.e., wait) on a counting semaphore S and invokes the V operation (i.e., signal) on the semaphore S after storing x to memory. Semaphore S is initialized to two. What is the maximum possible value of x after all processes complete execution?(A) -2(B) -1(C) 1(D) 2

Answer»
10.

Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the P operation (i.e., wait) on semaphores a, b and c; process Y executes the P operation on semaphores b, c and d; process Z executes the P operation on semaphores c, d, and a before entering the respective code segments. After completing the execution of its code segment, each process invokes the V operation (i.e., signal) on its three semaphores. All semaphores are binary semaphores initialized to one. Which one of the following represents a deadlock-free order of invoking the P operations by the processes?(A) X: P(a)P(b)P(c) Y: P(b)P(c)P(d) Z: P(c)P(d)P(a)(B) X: P(b)P(a)P(c) Y: P(b)P(c)P(d) Z: P(a)P(c)P(d)(C) X: P(b)P(a)P(c) Y: P(c)P(b)P(d) Z: P(a)P(c)P(d)(D) X: P(a)P(b)P(c) Y: P(c)P(b)P(d) Z: P(c)P(d)P(a)

Answer» Answer: (B)
Explanation: Option A can cause deadlock. Imagine a situation process X has acquired a, process Y has acquired b and process Z has acquired c and d. There is circular wait now.

Option C can also cause deadlock. Imagine a situation process X has acquired b, process Y has acquired c and process Z has acquired a. There is circular wait now.

Option D can also cause deadlock. Imagine a situation process X has acquired a and b, process Y has acquired c. X and Y circularly waiting for each other.

See http://www.eee.metu.edu.tr/~halici/courses/442/Ch5%20Deadlocks.pdf

11.

A tourist covers half of his journey by train at 60 km/h, half of the remainder by bus at 30 km/h and the rest by cycle at 10 km/h. The average speed of the tourist in km/h during his entire journey is(A) 36(B) 30(C) 24(D) 18

Answer»
12.

Find the sum of the expression(A) 7(B) 8(C) 9(D) 10

Answer»
13.

An index is clustered, if(A) it is on a set of fields that form a candidate key.(B) it is on a set of fields that include the primary key.(C) the data records of the file are organized in the same order as the data entries of the index.(D) the data records of the file are organized not in the same order as the data entries of the index.

Answer»
14.

The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?(A) 10, 20, 15, 23, 25, 35, 42, 39, 30(B) 15, 10, 25, 23, 20, 42, 35, 39, 30(C) 15, 20, 10, 23, 25, 42, 35, 39, 30(D) 15, 10, 23, 25, 20, 35, 42, 39, 30

Answer»
15.

Consider the following relational schema. Students(rollno: integer, sname: string) Courses(courseno: integer, cname: string) Registration(rollno: integer, courseno: integer, percent: real)Which of the following queries are equivalent to this query in English? "Find the distinct names of all students who score more than 90% in the course numbered 107"(A) I, II, III and IV(B) I, II and III only(C) I, II and IV only(D) II, III and IV only

Answer» None
16.

Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R.How many candidate keys does the relation R have?(A) 3(B) 4(C) 5(D) 6

Answer»
17.

Consider the FDs given in above question. The relation R is(A) in 1NF, but not in 2NF.(B) in 2NF, but not in 3NF.(C) in 3NF, but not in BCNF.(D) in BCNF

Answer»
18.

In the above question, if array A is made to hold the string “abcde”, which of the above four test cases will be successful in exposing the flaw in this procedure?(A) None(B) 2 Only(C) 3 and 4 only(D) 4 only

Answer»
19.

A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes.What is the size of a page in KB in this computer?(A) 2(B) 4(C) 8(D) 16

Answer»
20.

The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are:(A) TCP, UDP, UDP and TCP(B) UDP, TCP, TCP and UDP(C) UDP, TCP, UDP and TCP(D) TCP, UDP, TCP and UDP

Answer»
21.

What is the logical translation of the following statement? "None of my friends are perfect." (A) A(B) B(C) C(D) D

Answer» None
22.

(A) A(B) B(C) C(D) D

Answer» None
23.

Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter.MultiDequeue(Q){ m = k while (Q is not empty and m > 0) { Dequeue(Q) m = m - 1 }}What is the worst case time complexity of a sequence of n MultiDequeue() operations on an initially empty queue? (GATE CS 2013)(A) (B) (C) (D) (A) A(B) B(C) C(D) D

Answer»