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.

Select the appropriate Passive voice for the above sentence.(A) Doctor be called at once.(B) Let the doctor be called at once.(C) Let us call the doctor at once.(D) At once the doctor be called.

Answer»
2.

Find the Integral value of f(x) = x * sinx within the limits 0, π.(A) π(B) 2π(C) π/2(D) 0

Answer»
3.

Choose the missing number in the series:9, 7, 12, 12, 15, 17, 18, 22, ?(A) 27(B) 21(C) 22(D) 24

Answer»
4.

Which of the below given sorting techniques has highest best-case runtime complexity.(A) Quick sort(B) Selection sort(C) Insertion sort(D) Bubble sort

Answer»
5.

‘A’ sells a DVD to ‘B’ at a gain of 17% and ‘B’ then sells it to ‘C’ at a loss of 25%. If ‘C’ pays Rupees 1053 to ‘B’. then what is the cost price of the DVD to ‘A’ ?(A) 1200(B) 1450(C) 1250(D) 1375

Answer»
6.

Let A = {a, b, c, d }, B = { p, q, r, s } denote sets.R : A –> B, R is a function from A to B. Then which of the following relations are not functions ?(i) { (a, p) (b, q) (c, r) }(ii) { (a, p) (b, q) (c, s) (d, r) }(iii) { (a, p) (b, s) (b, r) (c, q) }(A) (i) and (ii) only(B) (ii) and (iii) only(C) (i) and (iii) only(D) None of these

Answer»
7.

P and Q can do a work in 30 and 60 days respectively. They agreed to work together and finish the work for 1000 Rupees. But they worked only for 10 days. How much money should they together get ?(A) 500(B) 100(C) 800(D) 200

Answer»
8.

If (4446)x + (2222)x = (10001)x then value of (2342)x – (1656)x = (?)x(A) 453(B) 353(C) 893(D) 686

Answer»
9.

Four different pens (1, 2, 3, 4) are to be distributed at random in four pen stands marked as 1, 2, 3, 4. What is the probability that none of the pen occupies the place corresponding to its number ?(A) 17/24(B) 3/8(C) 1/2(D) 5/8

Answer» None
10.

A and B are two sets. If |A| = 5 , |B| = 3 , then, the number of onto functions from A to B are ___ ?(A) 35(B) 150(C) 29(D) 27

Answer»
11.

Consider a graph where all edge weights are positive. We have computed shortest path using Dijkstra’s shortest path algorithm and total weight of shortest path is W.Consider below two statements about a shortest path from a source to a destination.i) If the graph is modified and all edge weights are multiplied with x, then the shortest path remains same and weight of shortest path becomes W*x (W multiplied by x).ii) If the graph is modified and x is added to all edge weights, then the shortest path remains same and weight of shortest path becomes W + n*x. Where n is number of edges on the shortest path.(A) Only (i) is always True(B) Only (ii) is always True(C) Both are always True(D) Neither (i) nor (ii) is always True

Answer»
12.

How many antisymmetric relations are there on a set with n elements ?(A) 2n.3n(n-1)/2(B) 2n(C) n2(D) n

Answer»
13.

Choose the word which is most nearly opposite in meaning to the word given in capitalsSQUALID(A) Fervid(B) Florid(C) Pristine(D) Extraneous

Answer»
14.

You are given a graph containing n vertices and m edges and given that the graph doesn’t contain cycle of odd length. Time Complexity of the best known algorithm to find out whether the graph is bipartite or not is ?(A) O(m+n)(B) O(1)(C) O(mn)(D) O(n2)

Answer»
15.

Given two Balanced binary search trees, B1 having n elements and B2 having m elements, what is the time complexity of the best known algorithm to merge these trees to form another balanced binary tree containing m+n elements ?(A) O(m+n)(B) O(mlogn)(C) O(nlogm)(D) O(m2 + n2)

Answer»
16.

Which of the following intuitive definition is true about LR(1) Grammar.(A) For a grammar to be LR(1) it is sufficient that a left-to-right shift reduce parser be able to recognize handles of right-sentential form when they appear on the stack.(B) For a grammar to be LR(1) it is sufficient that a left-to-right shift reduce parser be able to recognize handles of left-sentential form when they appear on the stack.(C) For a grammar to be LR(1) it is sufficient that a left-to-right shift reduce parser be able to recognize handles of left-sentential form or right-sentential form when they appear on the stack.(D) All of the above

Answer»
17.

Let A = { 1,2,3,4,…….∞ } and a binary operation ‘+’ is defined by a + b = ab ∀ a,b ∈ A. Which of the following is true ?(A) ( A, + ) is a semi group but not monoid(B) ( A, + ) is a monoid but not group(C) ( A, + ) is a group(D) ( A, + ) is not a semi group

Answer»
18.

The best meaning for the underlined phrase above is:(A) work secretly(B) remain aligned(C) do without the help of others(D) remain non-aligned

Answer»
19.

You are given an array A[] having n random bits and a function OR(i,j) which will take two indexes from an array as parameters and will return the result of ( A[i] OR A[j] ) i.e bitwise OR. What is the minimum no of OR calls required so as to determine all the bits inside the array i.e. to determine every index of A[] whether it has 0 or 1 ?(A) N-1(B) N*(N-1)/2(C) N(D) Not possible to determine the bit array

Answer»
20.

Consider a binary min heap containing n elements and every node is having degree 2 ( i.e. full binary min heap tree). What is the probability of finding the largest element at the last level ?(A) 1/2(B) 1(C) 1/n(D) 1/2^n

Answer»
21.

Which of the following is false:(A) Digital signature is used to verify that a message is authentic.(B) Digital certificate is issued by a third party.(C) Digital certificate ensures integrity of the message.(D) Digital signature ensures non-repudiation.

Answer»
22.

Consider an array consisting of –ve and +ve numbers. What would be the worst case time complexity of an algorithm to segregate the numbers having same sign altogether i.e all +ve on one side and then all -ve on the other ?(A) O(N)(B) O(N Log N)(C) O(N * N)(D) O(N Log Log N)

Answer»
23.

Consider the following C codeint main(){ int a = 300; char *b = (char *)&a; *++b = 2; printf("%d ",a); return 0;}Consider the size of int as two bytes and size of char as one byte. Predict the output of the following code .Assume that the machine is little-endian.(A) 556(B) 300(C) Runtime Error(D) Compile Time Error

Answer»
24.

Consider the following C code: int A[100][100]; int main() { for(int i=1; i < 100 ; i++) for(int j=1; j < 100;j++) A[i][j] = (i/j)*(j/i); return 0; }What will be the sum of the all the elements of double dimensional array A after implementing the above function ?(A) 100(B) 99(C) (100*99)/2(D) 0

Answer»
25.

(A) 1(B) 2(C) 3(D) 0

Answer»
26.

Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the top in each of the stack and then increasing downwards).Given a queue of size n in which we have to put all n elements in increasing order. What will be the time complexity of the best known algorithm?(A) O(n logk)(B) O(nk)(C) O(n2)(D) O(k2)

Answer»
27.

Suppose M1 and M2 are two TM’s such that L(M1) = L(M2). Then(A) On every input on which M1 doesn’t halt, M2 doesn’t halt too.(B) On every i/p on which M1 halts, M2 halts too.(C) On every i/p which M1 accepts, M2 halts.(D) None of above.

Answer»
28.

Which of the following statements is correct about context sensitive grammar?I) In a context sensitive grammar, ε can’t be the right hand side of any productionII) In a context sensitive grammar, number of grammar symbols on the left hand side of aproduction can’t be greater than the number of grammar symbols on the right hand sideIII) In a context sensitive grammar, number of grammar symbols on the left hand side of aproduction can’t be greater than the number of terminals on the right hand sideIV) In a context sensitive grammar, number of grammar symbols on the left hand side of aproduction can’t be greater than the number of non-terminals on the right hand side(A) I(B) II(C) III(D) IV

Answer»
29.

Let G be the CFG, l be the number of left most derivations, r be the number of right most derivations and P be the number of parse trees. Assume l , r and P are computed for a particular string. For a given CFG ‘G’ and given string ‘w’, what is the relation between l , P , r ?(A) l ≤ P ≥ r(B) l = P = r(C) l ≥ P ≤ r(D) none of these

Answer»
30.

Let, init (L) = {set of all prefixes of L},Let L = {w | w has equal number of 0’s and 1’s}init (L) will contain:(A) all binary strings with unequal number of 0’s and 1’s(B) all binary strings with ԑ-string(C) all binary strings with exactly one more 0’s than number of 1’s(D) None of above

Answer»
31.

Linked Questions 58-59Assume GeeksforGeeks implemented the new page replacement algorithm in virtual memory and given its name as ‘Geek’. Consider the working strategy of Geek as following-Each page in memory maintains a count which is incremented if the page is referred and no page fault occurs.If a page fault occurs, the physical page with zero count or smallest count is replaced by new page and if more than one page with zero count or smallest count then it uses FIFO strategy to replace the page.Find the number of page faults using Geeks algorithm for the following reference string (assume three physical frames are available which are initially free)Reference String : “A B C D A B E A B C D E B A D”(A) 7(B) 9(C) 11(D) 13

Answer»
32.

A packet addressed to 128.48.64.0 came to a router having routing table as follows.Which interface will it be forwarded to ?(A) A(B) B(C) C(D) D

Answer»
33.

Consider 2 scenarios:C1: For DFA (ϕ, Ʃ, δ, qo, F), if F = ϕ, then L = Ʃ*C2: For NFA (ϕ, Ʃ, δ, qo, F), if F = ϕ, then L = Ʃ*Where F = Final states setϕ = Total states setChoose the correct option ?(A) Both are true(B) Both are False(C) C1 is true, C2 is false(D) C1 is false, C2 is true

Answer»
34.

The initial state of a mod 10 up counter is 1000. What would be the state after 54 clock pulses?(A) 1000(B) 0001(C) 0010(D) 0100

Answer»
35.

Which of the following statement is false ?(A) Indirect addressing can be used to pass array as a parameter.(B) Complex Instruction Set Computing(CISC) contains larger number of instructions and addressing modes as compared to Reduced Instruction Set Computing(RISC).(C) Hardwired control unit is slower than micro-programmed control unit.(D) Daisy chain mechanism can be used as a priority based interrupt system.

Answer»
36.

Suppose a stack is to be implemented with a linked list instead of an array. What would be the effect on the time complexity of the push and pop operations of the stack implemented using linked list (Assuming stack is implemented efficiently)?(A) O(1) for insertion and O(n) for deletion(B) O(1) for insertion and O(1) for deletion(C) O(n) for insertion and O(1) for deletion(D) O(n) for insertion and O(n) for deletion

Answer»
37.

Consider a sorted array of n numbers. What would be the time complexity of the best known algorithm to find a pair ‘a’ and ‘b’ such that |a-b| = k , k being a positive integer.(A) O(n)(B) O(n log n)(C) O(n ^ 2)(D) O(log n)

Answer»
38.

The Boolean function f implemented in the figure shown below, using two input multiplexers is:(A) AB’C + ABC’(B) A’B’C + A’BC’(C) A’BC + A’B’C’(D) ABC + AB’C’

Answer»
39.

The complement of the function F = (A + B’)(C’ + D)(B’ + C) is:(A) A’B + CD’ + BC’(B) AB’ + C’D + B’C(C) AB’ + CD’ + BC(D) AB + BC + CD

Answer»
40.

If Kruskal’s algorithm is used for finding a minimum spanning tree of a weighted graph G with n vertices and m edges and edge weights are already given in a sorted list, then, What will be the time complexity to compute the minimum cost spanning tree given that union and find operations take amortized O(1) ?(A) O(m logn)(B) O(n)(C) O(m)(D) O(n logm)

Answer»
41.

What will be the output produced by the following C code:int main(){ int array[5][5]; printf("%d",( (array == *array) && (*array == array[0]) )); return 0; }(A) 1(B) 0(C) 2(D) -1

Answer»
42.

Consider a directed graph with n vertices and m edges such that all edges have same edge weights. Find the complexity of the best known algorithm to compute the minimum spanning tree of the graph?(A) O(m+n)(B) O(m logn)(C) O(mn)(D) O(n logm)

Answer»
43.

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

Answer»
44.

Consider the problem of computing min-max in an unsorted array where min and max are minimum and maximum elements of array. Algorithm A1 can compute min-max in a1 comparisons without divide and conquer. Algorithm A2 can compute min-max in a2 comparisons by scanning the array linearly. What could be the relation between a1 and a2 considering the worst case scenarios?(A) a1 < a2(B) a1 > a2(C) a1 = a2(D) Depends on the input

Answer»