InterviewSolution
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. |
A Software Requirements Specification (SRS) document should avoid discussing which one of the following?(A) User interface issues(B) Non-functional requirements(C) Design specification(D) Interfaces with third party software |
| Answer» | |
| 2. |
Consider a simple checkpointing protocol and the following set of operations in the log.(start, T4); (write, T4, y, 2, 3); (start, T1); (commit, T4); (write, T1, z, 5, 7);(checkpoint);(start, T2); (write, T2, x, 1, 9); (commit, T2); (start, T3); (write, T3, z, 7, 2); If a crash happens now and the system tries to recover using both undo and redo operations, what are the contents of the undo list and the redo list(A) Undo: T3, T1; Redo: T2(B) Undo: T3, T1; Redo: T2, T4(C) Undo: none; Redo: T2, T4, T3; T1(D) Undo: T3, T1, T4; Redo: T2 |
| Answer» | |
| 3. |
Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to 2020?(A)h(i) = (12 ∗ i) mod 10(B)h(i) = (11 ∗ i2) mod 10(C)h(i) =i3 mod 10(D)h(i) =i2 mod 10 |
|
Answer» Answer: (C) Explanation: Since mod 10 is used, the last digit matters. If you do cube all numbers from 0 to 9, you get following Number Cube Last Digit in Cube 0 0 0 1 1 1 2 8 8 3 27 7 4 64 4 5 125 5 6 216 6 7 343 3 8 512 2 9 729 9 Therefore all numbers from 0 to 2020 are equally divided in 10 buckets. If we make a table for square, we don\’t get equal distribution. In the following table. 1, 4, 6 and 9 are repeated, so these buckets would have more entries and buckets 2, 3, 7 and 8 would be empty. Number Square Last Digit in Square 0 0 0 1 1 1 2 4 4 3 9 9 4 16 6 5 25 5 6 36 6 7 49 9 8 64 4 9 81 1 Alternative approach – (a) (0,1,4,9,6,5,6,9,4,1,0) repeated So, only h(i) =i3 mod 10 covers all the digits from 0 to 9. |
|
| 4. |
Which of the following languages is/are regular?L1: {wxwR ⎪ w, x ∈ {a, b}* and ⎪w⎪, ⎪x⎪ >0} wR is the reverse of string wL2: {anbm ⎪m ≠ n and m, n≥0L3: {apbqcr ⎪ p, q, r ≥ 0} (A) L1 and L3 only(B) L2 only(C) L2 and L3 only(D) L3 only |
| Answer» None | |
| 5. |
Consider alphabet ∑ = {0, 1}, the null/empty string λ and the sets of strings X0, X1 and X2 generated by the corresponding non-terminals of a regular grammar. X0, X1 and X2 are related as follows:X0 = 1 X1X1 = 0 X1 + 1 X2X2 = 0 X1 + {λ} Which one of the following choices precisely represents the strings in X0?(A) 10 (0* + (10)*)1(B) 10 (0* + (10)*)*1(C) 1(0* + 10)*1(D) 10 (0 + 10)*1 + 110 (0 + 10)*1 |
| Answer» None | |
| 6. |
A half adder is implemented with XOR and AND gates. A full adder is implemented with two half adders and one OR gate. The propagation delay of an XOR gate is twice that of an AND/OR gate. The propagation delay of an AND/OR gate is 1.2 microseconds. A 4-bit ripple-carry binary adder is implemented by using full adders. The total propagation time of this 4-bit binary adder in microseconds is(A) 19.2 microseconds |
| Answer» None | |
| 7. |
With reference to the B+ tree index of order 1 shown below, the minimum number of nodes (including the root node) that must be fetched in order to satisfy the following query: “Get all records with a search key greater than or equal to 7 and less than 15” is ________(A) 4(B) 5(C) 6(D) 7 |
| Answer» None | |
| 8. |
Consider the following two statements.S1: If a candidate is known to be corrupt, then he will not be elected.S2: If a candidate is kind, he will be elected.Which one of the following statements follows from S1 and S2 as per sound inference rules of logic?(A) If a person is known to be corrupt, he is kind(B) If a person is not known to be corrupt, he is not kind(C) If a person is kind, he is not known to be corrupt(D) If a person is not kind, he is not known to be corrupt |
| Answer» None | |
| 9. |
Consider the sequence of machine instructions given below: MUL R5, R0, R1 DIV R6, R2, R3 ADD R7, R5, R6 SUB R8, R7, R4 In the above sequence, R0 to R8 are general purpose registers. In the instructions shown, the first register stores the result of the operation performed on the second and the third registers. This sequence of instructions is to be executed in a pipelined instruction processor with the following 4 stages: (1) Instruction Fetch and Decode (IF), (2) Operand Fetch (OF), (3) Perform Operation (PO) and (4) Write back the Result (WB). The IF, OF and WB stages take 1 clock cycle each for any instruction. The PO stage takes 1 clock cycle for ADD or SUB instruction, 3 clock cycles for MUL instruction and 5 clock cycles for DIV instruction. The pipelined processor uses operand forwarding from the PO stage to the OF stage. The number of clock cycles taken for the execution of the above sequence of instructions is ___________(A) 11(B) 12(C) 13(D) 14 |
| Answer» None | |
| 10. |
Choose the statement where underlined word is used correctly.(A) The industrialist had a personnel jet(B) I write my experience in my personnel diary(C) All personnel are being given the day off(D) Being religious is a personnel aspect |
| Answer» | |
| 11. |
Based on the given statements, select the most appropriate option to solve the given question.What will be the total weight of 10 poles each of same weight?Statements: (I) One fourth of the weight of a pole is 5 kg (II) The total weight of these poles is 160 kg more than the total weight of two poles.(A) Statement II alone is not sufficient(B) Statement II alone is not sufficient(C) Either I or II alone is sufficient(D) Both statements I and II together are not sufficient. |
| Answer» None | |
| 12. |
Four branches of a company are located at M, N, O and P. M is north of N at a distance of 4 km; P is south of O at a distance of 2 km; N is southeast of O by 1 km. What is the distance between M and P in km?(A) 5.34(B) 6.74(C) 28.5(D) 45.49 |
| Answer» | |
| 13. |
In a triangle PQR, PS is the angle bisector of ∠ QPR and ∠ QPS = 60°. What is the length of PS?(A) a(B) b(C) c(D) d |
| Answer» None | |
| 14. |
(A) 6(B) 7(C) 8(D) 9 |
| Answer» None | |