InterviewSolution
Saved Bookmarks
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. |
Let pA be a problem that belongs to the class NP. Then which one of the following is TRUE?(A) There is no polynomial time algorithm for pA(B) If pA can be solved deterministically in polynomial time,then P = NP(C) If pA is NP-hard, then it is NP-complete.(D) pA may be undecidable. |
| Answer» | |
| 2. |
Which of the following statement(s)is / are correct regarding Bellman-Ford shortest path algorithm?P: Always finds a negative weighted cycle, if one exist s.Q: Finds whether any negative weighted cycle is reachable from the source. (A) P Only(B) Q Only(C) Both P and Q(D) Neither P nor Q |
| Answer» | |
| 3. |
A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because(A) It reduces the memory access time to read or write a memory location.(B) It helps to reduce the size of page table needed to implement the virtual address space of a process.(C) It is required by the translation lookaside buffer.(D) It helps to reduce the number of page faults in page replacement algorithms. |
| Answer» | |
| 4. |
The coupling between different modules of a software is categorized as follows: I. Content coupling II. Common coupling III. Control coupling IV. Stamp coupling V. Data coupling Coupling between modules can be ranked in the order of strongest (least desirable) to weakest (most desirable) as follows:(A) I-II-III-IV-V(B) V-IV-III-II-I(C) I-III-V -II-IV(D) IV-II-V-III-I |
| Answer» | |
| 5. |
What is the minimum number of gates required to implement the Boolean function (AB+C)if we have to use only 2-input NOR gates?(A) 2(B) 3(C) 4(D) 5 |
| Answer» | |
| 6. |
The running time of an algorithm is represented by the following recurrence relation: if n <= 3 then T(n) = n else T(n) = T(n/3) + cnWhich one of the following represents the time complexity of the algorithm? <pre>(A) (n)(B) (n log n)(C) (n^2)(D) (n^2log n) </pre>(A) A(B) B(C) C(D) D |
| Answer» None | |
| 7. |
Which one of the following in NOT necessarily a property of a Group?(A) Commutativity(B) Associativity(C) Existence of inverse for every element(D) Existence of identity |
| Answer» | |
| 8. |
Consider a disk system with 100 cylinders. The requests to access the cylinders occur in following sequence:4, 34, 10, 7, 19, 73, 2, 15, 6, 20Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1ms to move from one cylinder to adjacent one and shortest seek time first policy is used?(A) 95 ms(B) 119 ms(C) 233 ms(D) 276 ms |
| Answer» | |
| 9. |
The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows:void enter_CS(X){ while test-and-set(X) ;}void leave_CS(X){ X = 0;}In the above solution, X is a memory location associated with the CS and is initialized to 0. Now consider the following statements:I. The above solution to CS problem is deadlock-freeII. The solution is starvation free.III. The processes enter CS in FIFO order.IV More than one process can enter CS at the same time.Which of the above statements is TRUE?(A) I only(B) I and II(C) II and III(D) IV only |
| Answer» | |
| 10. |
How many 32K x 1 RAM chips are needed to provide a memory capacity of 256K-bytes?(A) 8(B) 32(C) 64(D) 128 |
| Answer» | |
| 11. |
Consider the HTML t able definition given below:< table border=1><tr><td rowspan=2> ab </td><td colspan=2> cd </td></tr><tr><td> ef </td><td rowspan=2> gh </td></tr><tr> <td colspan=2> ik </td></tr></table>The number of rows in each column and the number of columns in each row are:(A) (2, 2, 3) and (2, 3, 2)(B) (2, 2, 3) and (2, 2, 3)(C) (2, 3, 2) and (2, 3, 2)(D) (2, 3, 2) and (2, 2, 3) |
| Answer» | |
| 12. |
In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements:I. If a process makes a transition D, it would result in another process making transition A immediately.II. A process P2 in blocked state can make transition E while another process P1 is in running state.III. The OS uses preemptive scheduling.IV. The OS uses non-preemptive scheduling.Which of the above statements are TRUE?(A) I and II(B) I and III(C) II and III(D) II and IV |
| Answer» | |
| 13. |
The below DFA accepts the set of all strings over {0,1} that(A) begin either with 0 or 1(B) end with 0(C) end with 00(D) contain the substring 00. |
| Answer» | |
| 14. |
For the composition table of a cyclic group shown below*abcdaabcdbbadcccdbaddcabWhich one of the following choices is correct?(A) a, b are generators(B) b, c are generators(C) c, d are generators(D) d, a are generators |
| Answer» None | |
| 15. |
The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table?(A) A(B) B(C) C(D) D |
| Answer» | |
| 16. |
Let L = L1∩L2, where L1 and L2 are languages as defined below:L1 = {| m, n >= 0 }L2 = {| i, j, k >= 0 }Then L is(A) Not recursive(B) Regular(C) Context free but not regular(D) Recursively enumerable but not context free. |
| Answer» | |
| 17. |
In quick sort, for sorting n elements, the (n/4)th smallest element is selected as pivot using an O(n) time algorithm. What is the worst case time complexity of the quick sort?<pre>(A)(n)(B)(nLogn)(C)(n^2)(D)(n^2 log n) </pre>(A) A(B) B(C) C(D) D |
| Answer» | |
| 18. |
Match all items in Group 1 with correct options from those given in Group 2.Group 1 Group 2P. Regular expression 1. Syntax analysisQ. Pushdown automata 2. Code generationR. Dataflow analysis 3. Lexical analysisS. Register allocation 4. Code optimization(A) P-4. Q-1, R-2, S-3(B) P-3, Q-1, R-4, S-2(C) P-3, Q-4, R-1, S-2(D) P-2, Q-1, R-4, S-3 |
| Answer» | |
| 19. |
Output of following program?#include <stdio.h>int fun(int n, int *f_p){int t, f;if (n <= 1){*f_p = 1;return 1;}t = fun(n- 1,f_p);f = t+ * f_p;*f_p = t;return f;}int main(){int x = 15;printf (" %d \n", fun(5, &x));return 0;}(A) 6(B) 8(C) 14(D) 15 |
| Answer» None | |
| 20. |
What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0.(A) 2(B) 3(C) 4(D) 5 |
| Answer» None | |
| 21. |
Consider the following graph:Which one of the following is NOT the sequence of edges added to the minimum spanning tree using Kruskal’s algorithm?(A) (b,e)(e,f)(a,c)(b,c)(f,g)(c,d)(B) (b,e)(e,f)(a,c)(f,g)(b,c)(c,d)(C) (b,e)(a,c)(e,f)(b,c)(f,g)(c,d)(D) (b,e)(e,f)(b,c)(a,c)(f,g)(c,d) |
| Answer» | |
| 22. |
In the RSA public key cryptosystem, the private and public keys are (e, n) and (d, n) respectively, where n = p*q and p and q are large primes. Besides, n is public and p and q are private. Let M be an integer such that 0 < M < n and f(n) = (p- 1)(q-1). Now consider the following equations. I. M’= Me mod n M = (M’)d mod n II. ed ≡ 1 mod n III. ed ≡ 1 mod f(n)IV. M’= Me mod f(n) M = (M’)d mod f(n) Which of the above equations correctly represent RSA cryptosystem?(A) I and II(B) I and III(C) II and IV(D) III and IV |
| Answer» None | |
| 23. |
Which one of the following is the most appropriate logical formula to represent the statement? “Gold and silver ornaments are precious”.The following notations are used:G(x): x is a gold ornamentS(x): x is a silver ornamentP(x): x is precious(A) ∀x(P(x)→(G(x)∧S(x)))(B) ∀x((G(x)∧S(x))→P(x))(C) ∃x((G(x)∧S(x))→P(x)(D) ∀x((G(x)∨S(x))→P(x)) |
| Answer» | |
| 24. |
An unbalanced dice (with 6 faces, numbered from 1 to 6) is thrown. The probability that the face value is odd is 90% of the probability that the face value is even. The probability of getting any even numbered face is the same.If the probability that the face is even given that it is greater than 3 is 0.75, which one of the following options is closest to the probability that the face value exceeds 3?(A) 0.453(B) 0.468(C) 0.485(D) 0.492 |
| Answer» None | |