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 formula used to compute an approximation for the second derivative of a function f at a point X0 is(A) A(B) B(C) C(D) D

Answer» None
2.

Let Ax=b be a system of linear equations where A is an m×n matrix and b is a m×1 column vector and X is an n×1 column vector of unknowns. Which of the following is false?(A) The system has a solution if and only if, both A and the augmented matrix [Ab] have the same rank(B) If m(C) If m=n and b is a non-zero vector, then the system has a unique solution(D) The system will have only a trivial solution when m=n, b is the zero vector and rank(A) = n

Answer»
3.

Which of the following statement is false?(A) The set of rational numbers is an abelian group under addition(B) The set of integers in an abelian group under addition(C) The set of rational numbers form an abelian group under multiplication(D) The set of real numbers excluding zero is an abelian group under multiplication

Answer»
4.

Newton-Raphson iteration formula for finding 3√c, where c > 0 is.(A) a(B) b(C) c(D) d

Answer»
5.

Suppose X and Y are sets and |X| and |Y| are their respective cardinalities. It is given that there are exactly 97 functions from X to Y. From this one can conclude that(A) |X|=1,|Y|=97(B) |X|=97,|Y|=1(C) |X|=97,|Y|=97(D) None of the above

Answer»
6.

Two dice are thrown simultaneously. The probability that at least one of them will have 6 facing up is(A) 1/36(B) 1/3(C) 25/36(D) 11/36

Answer» Answer: (D)
Explanation: There can be two cases:

  • Case 1: Exactly one dice has 6 facing up and other dice can have any number from 1,2,3,4,5 facing up. There will be 5*2=10 such occurrences.
  • Case 2: Both of the dices having 6 coming up. Only one possible case exists for the same.

Thus total favorable cases = 10+1 = 11
While total cases = 6*6=36
Which gives the desired probability as: 11/36.

7.

Quicksort is run on two inputs shown below to sort in ascending order taking first element as pivot,(i) 1, 2, 3,......., n(ii) n, n-1, n-2,......, 2, 1 Let C1 and C2 be the number of comparisons made for the inputs (i) and (ii) respectively. Then,(A) C1 < C2(B) C1 > C2(C) C1 = C2(D) We cannot say anything for arbitrary n

Answer»
8.

The recurrence relation T(1) = 2 T(n) = 3T(n/4)+nhas the solution, T(n) equals to(A) O(n)(B) O(log n)(C) O(n^3/4)(D) None of the above

Answer»
9.

Define for a context free language L⊆ {0, 1}* , init(L)={u ∣ uv ∈ L for some v in {0,1}∗} ( in other words, init(L) is the set of prefixes of L)Let L = {w ∣ w is nonempty and has an equal number of 0’s and 1’s}Then init(L) is(A) the set of all binary strings with unequal number of 0’s and 1’s(B) the set of all binary strings including null string(C) the set of all binary strings with exactly one more 0 than the number of 1’s or one more 1 than the number of 0’s(D) None of the above

Answer»
10.

A solution to the Dining Philosophers Problem which avoids deadlock is:(A) ensure that all philosophers pick up the left fork before the right fork(B) ensure that all philosophers pick up the right fork before the left fork(C) ensure that one particular philosopher picks up the left fork before the right fork, and that all other philosophers pick up the right fork before the left fork(D) None of the above

Answer»
11.

A binary search tree is generated by inserting in order the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24 The number of nodes in the left subtree and right subtree of the root respectively is(A) (4, 7)(B) (7, 4)(C) (8, 3)(D) (3, 8)

Answer»
12.

The matricescommute under multiplication(A) if a = b orΘ =nπ, n an integer(B) always(C) never(D) if a cosΘ = b sinΘ

Answer»
13.

The probability that the top and bottom cards of a randomly shuffled deck are both aces is(A) 4/52 x 4/52(B) 4/52 x 3/52(C) 4/52 x 3/51(D) 4/52 x 4/51

Answer»
14.

If L1 and L2 are context free languages and R a regular set, one of the languages below is not necessarily a context free language, which one?(A) L1 . L2(B) L1 ∩ L2(C) L1 ∩ R(D) L1 ∪ L2

Answer»
15.

The minimum number of interchanges needed to convert the array 89, 19, 40, 17, 12, 10, 2, 5, 7, 11, 6, 9, 70into a heap with the maximum element at the root is(A) 0(B) 1(C) 2(D) 3

Answer»
16.

A critical section is a program segment(A) which should run in a certain specified amount of time(B) which avoids deadlocks(C) where shared resources are accessed(D) which must be enclosed by a pair of semaphore operations, P and V

Answer»
17.

Let X= {2, 3, 6, 12, 24}, Let ≤ be the partial order defined by X ≤ Y if x divides y. Number of edges in the Hasse diagram of (X,≤) is(A) 3(B) 4(C) 9(D) None of the above

Answer»
18.

The process state transition diagram in below figure is representative of(A) a batch operating system(B) an operating system with a preemptive schedular(C) an operating system with a non-preemptive schedular(D) a uni-programmed operating system

Answer»
19.

The grammar whose productions are <stmt> → if id then <stmt> <stmt> → if id then <stmt> else <stmt> <stmt> → id := idis ambiguous becausea) the sentenceif a then if b then c:= d has two parse treesb) the left most and right most derivations of the sentenceif a then if b then c:= d give rise to different parse treesc) the sentenceif a then if b then c:= d else c:= f has more than two parse treesd) the sentenceif a then if b then c:= d else c:= f has two parse trees(A) a(B) b(C) c(D) d

Answer»
20.

An advantage of chained hash table (external hashing) over the open addressing scheme is(A) Worst case complexity of search operations is less(B) Space used is less(C) Deletion is easier(D) None of the above

Answer» None
21.

Number of machine cycles required for RET instruction in 8085 microprocessor is(A) 1(B) 2(C) 3(D) 5

Answer»
22.

(A) which should run in a certain specified amount of time(B) which avoids deadlocks(C) where shared resources are accessed(D) which must be enclosed by a pair of semaphore operations, P and V

Answer»
23.

Which of the following is an example of a spooled device?(A) a line printer used to print the output of a number of jobs(B) a terminal used to enter input data to a running program(C) a secondary storage device in a virtual memory system(D) a graphic display device

Answer»
24.

The concurrent programming constructs fork and join are as below:fork <label> which creates a new process executing from the specified labeljoin <variable> which decrements the specified synchronization variable (by 1) and terminates the process if the new value is not 0.Show the precedence graph for S1, S2, S3, S4, and S5 of the concurrent program below. N = 2 M = 2 fork L3 fork L4 S1L1:join N S3L2:join M S5L3:S2 goto L1L4:S4 goto L2next:

Answer»
25.

Consider the syntax-directed translation schema (SDTS) shown below:E → E + E {print “+”}E → E ∗ E {print “.”}E → id {print id.name}E → ( E )An LR-parser executes the actions associated with the productions immediately after a reduction by the corresponding production. Draw the parse tree and write the translation for the sentence(a+b)∗(c+d), using the SDTS given above.

Answer»
26.

Consider the following program in pseudo-pascal syntax. What is printed by the program if parameter ain procedure test1 is passed asi) call-by-reference parameterii) call-by-value-result parameterprogram Example (input, output)var b: integer;procedure test2:begin b:=10; endprocedure test1 (a:integer):begin a:=5; writeln ('point 1: ', a, b); test2; writeln ('point 2: ', a, b);endbegin (*Example*)b:=3; test1(b);writeln('point3: ', b);end

Answer»
27.

A file system with a one-level directory structure is implemented on a disk with disk block size of 4K bytes. The disk is used as follows:a) What is the maximum possible number of files?b) What is the maximum possible file size in blocks?

Answer»
28.

Consider the synchronous sequential circuit in the below figurea) Draw a state diagram, which is implemented by the circuit. Use the following names for the states corresponding to the values of flip-flops as given below.b) Given that the initial state of the circuit is S4, identify the set of states, which are not reachable.

Answer»
29.

Insert the characters of the string K R P C S N Y T J M into a hash table of size 10.Use the hash functionh(x) = ( ord(x) – ord("a") + 1 ) mod10If linear probing is used to resolve collisions, then the following insertion causes collision(A) Y(B) C(C) M(D) P

Answer» None
30.

The pass number for each of the following activitiesObject code generationLiterals added to literal tableListing printedAddress resolution of local symbolsThat occur in a two pass assembler respectively are(A) 1, 2, 1, 2(B) 2, 1, 2, 1(C) 2, 1, 1, 2(D) 1, 2, 2, 2

Answer»
31.

Let G be the directed, weighted graph shown in below figureWe are interested in the shortest paths from A.(a) Output the sequence of vertices identified by the Dijkstra’s algorithm for single source shortest path when the algorithm is started at node A.(b) Write down sequence of vertices in the shortest path from A to E.(c) What is the cost of the shortest path from A to E?

Answer»
32.

A complete, undirected, weighted graph G is given on the vertex {0, 1,…., n−1} for any fixed ‘n’. Draw the minimum spanning tree of G ifa) the weight of the edge (u,v) is ∣ u−v ∣b) the weight of the edge (u,v) is u + v

Answer»
33.

The average number of key comparisons done in a successful sequential search ina list of length it is(A) log n(B) (n-1)/2(C) n/2(D) (n+1)/2

Answer» None
34.

Consider the following program that attempts to locate an element x in a sorted array a[ ] using binary search. Assume N>1. The program is erroneous. Under what conditions does the program fail?var i,j,k: integer; x: integer; a: array; [1....N] of integer;begin i:= 1; j:= N;repeat k:(i+j) div 2; if a[k] < x then i:= k else j:= k until (a[k] = x) or (i >= j); if (a[k] = x) then writeln ('x is in the array')else writeln ('x is not in the array')end;(A) x is the last element of the array a[](B) x is greater than all elements of the array a[](C) Both of the Above(D) x is less than the last element of the array a[]

Answer»
35.

A hard disk is connected to a 50 MHz processor through a DMA controller. Assume that the initial set-up of a DMA transfer takes 1000 clock cycles for the processor, and assume that the handling of the interrupt at DMA completion requires 500 clock cycles for the processor. The hard disk has a transfer rate of 2000 Kbytes/sec and average block transferred is 4 K bytes. What fraction of the processor time is consumed by the disk, if the disk is actively transferring 100% of the time?.(A) 1.5%(B) 1%(C) 2.5%(D) 10%

Answer»
36.

A computer system has a three level memory hierarchy, with access time and hit ratios as shown below:a) What should be the minimum sizes of level 1 and 2 memories to achieve an average access time of less than 100 nsec?b) What is the average access time achieved using the chosen sizes of level 1 and level 2 memories?

Answer»
37.

The correct matching for the following pairs isA. Activation record 1. Linking loaderB. Location counter 2. Garbage collectionC. Reference counts 3. Subroutine callD. Address relocation 4. Assembler(A) A-3, B-4, C-1, D-2(B) A-4, B-3, C-1, D-2(C) A-4, B-3, C-2, D-1(D) A-3, B-4, C-2, D-1

Answer»
38.

A 1000 Kbyte memory is managed using variable partitions but no compaction. It currently has two partitions of sizes 200 Kbytes and 260 Kbytes respectively. The smallest allocation request in Kbytes that could be denied is for(A) 151(B) 181(C) 231(D) 541

Answer»
39.

A demand paged virtual memory system uses 16 bit virtual address, page size of 256 bytes, and has 1 Kbyte of main memory. LRU page replacement is implemented using a list whose current status (page number in decimal) is.For each hexadecimal address in the address sequence given below 00FF, 010D, 10FF, 11B0indicatei) the new status of the listii) page faults, if any, andiii) page replacements, if any

Answer»
40.

Which of the following macros can put a micro assembler into an infinite loop?(i).MACRO M1 X.IF EQ, X ;if X=0 thenM1 X + 1.ENDC.IF NE X ;IF X≠0 then.WORD X ;address (X) is stored here.ENDC.ENDM(ii).MACRO M2 X.IF EQ XM2 X.ENDC.IF NE, X.WORD X+1.ENDC.ENDM(A) (ii) only(B) (i) only(C) Both (i) and (ii)(D) None of the above

Answer»
41.

Consider the given figure of state table for a sequential machine. The number of states in the minimized machine will be.(A) 4(B) 3(C) 2(D) 1

Answer»
42.

What is the equivalent Boolean expression in product-of-sums form for the Karnaugh map given below..(A) BD’ + B’D(B) (B+C’+D)(B’+C+D’)(C) (B+D)(B’+D’)(D) (B+D’)(B’+D)

Answer»
43.

A binary search tree is used to locate the number 43. Which of the following probe sequences are possible and which are not? Explain(A) 61 52 14 17 40 43(B) 2 3 50 40 60 43(C) 10 65 31 48 37 43(D) 81 61 52 14 41 43(E) 17 77 27 66 18 43

Answer»
44.

Let f be a function defined byFind the values for the constants a, b, c and d so that f is continuous and differentiable every where on the real line.

Answer»
45.

A micro program control unit is required to generate a total of 25 control signals. Assume that during any microinstruction , at most two control signals are active. Minimum number of bits required in the control word to generate the required control signals will be(A) 2(B) 2.5(C) 10(D) 12

Answer»
46.

Consider the following statements:i. First-in-first out types of computations are efficiently supported by STACKS.ii. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations.iii. Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices.iv. Last-in-first-out type of computations are efficiently supported by QUEUES.Which of the following is correct?(A) (ii) and (iii) are true(B) (i) and (ii) are true(C) (iii) and (iv) are true(D) (ii) and (iv) are true

Answer»