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. |
Consider the following functionFunction F (n, m: integer): integer;begin If (n<=0) or (m<=0) then F:=1 else F:= F(n-1,m) + F(n, m-1); end;Use the recurrence relationto answer the following question.Assume that n, m are positive integers. Write only the answers without any explanation.a. What is the value of F(n,2)?b. What is the value of (n,m)?c. How many recursive calls are made to the function F, including the original call, when evaluating F(n,m). |
| Answer» | |
| 2. |
Let A= (aij) be an n-rowed square matrix and I12 be the matrix obtained by interchanging the first and second rows of the n-rowed Identify matrix. Then AI12 is such that its first(A) row is the same as its second row(B) row is the same as the second row of A(C) column is the same as the second column of A(D) row is all zero |
| Answer» | |
| 3. |
Consider the grammarS→ bSeS→ PQRP→ bPcP→ εQ→ cQdQ→ εR→ dReR→ εwhere S,P,Q,R are non-terminal symbols with S being the start symbol; b,c,d,e are terminal symbols and ‘ε’ is the empty string. This grammar generates strings of the form bi, cj, dk, em for some i, j, k, m ≥ 0.(a). What is the condition on the values of i, j, k, m?(b). Find the smallest string that has two parse trees. |
| Answer» None | |
| 4. |
Given√(224)r = (13)rThe value of the radix r is:(A) 10(B) 8(C) 5(D) 6 |
| Answer» | |
| 5. |
A micro instruction into be designed to specifya. none or one of the three micro operations of one kind andb. none or upto six micro operations of another kindThe minimum number of bits in the micro-instruction is(A) 9(B) 5(C) 8(D) None of the above |
| Answer» | |
| 6. |
A partial order≤ is defined on the set S= {x, a1, a2,…..an, y} as x < ai for all i and ai≤ y for all i, where n≥1. The number of total orders on the set S which contain the partial order≤ is(A) n!(B) n+2(C) n(D) 1 |
| Answer» | |
| 7. |
A D flip-flop is to be connected to an 8085 microprocessor chip as a 1-bit output port with a port address of FF hex. Data bit D3 should be involved in the data transfer from CPU to the flip-flop. The flip-flop should be cleared on power ON.a. Using only one NAND gate (fan in of 10), one NOT gate and one D flip-flop. Draw the required interface logic circuit (only the relevant signals should be shown).b. Write a program to generate a square wave on the output of the flip-flop. ON and OFF periods of the square wave should be 7 bus cycles each. |
| Answer» | |
| 8. |
Consider a logic circuit shown in figure below. The functions f1,f2 and f(in canonical sum of products form in decimal notation) are :f1(w,x,y,z)= ∑ 8,9,10f2(w,x,y,z)= ∑ 7,8,12,13,14,15f(w,x,y,z) = ∑ 8,9The Function f3 isa. ∑9,10b. ∑9c. ∑1,8,9d. ∑8,10,15(A) a(B) b(C) c(D) d |
| Answer» | |
| 9. |
Which one of the following regular expressions over {0,1} denotes the set of all strings not containing 100 as a substring?(A) 0* (1+0)*(B) 0*1010*(C) 0*1*01*(D) 0*(10+1)* |
| Answer» | |
| 10. |
The number of equivalence relations of the set {1,2,3,4} is(A) 15(B) 16(C) 24(D) 4 |
| Answer» | |
| 11. |
Let R(a,b,c) and S(d,e,f) be two relations in which d is the foreign key of S that refers to the primary key of R. Consider the following four operations R and S1. Insert into R2. Insert into S3. Delete from R4. Delete from SWhich of the following can cause violation of the referential integrity constraint above?(A) None of (1), (2), (3) or (4) can cause its violation(B) All of (1), (2), (3) and (4) can cause its violation(C) Both (1) and (4) can cause its violation(D) Both (2) and (3) can cause its violation |
| Answer» | |
| 12. |
Which of the following languages over {a,b,c} is accepted by a deterministic pushdown automata?a. {wcwR ∣ w∈ {a,b}* }b. {wwR ∣ w∈ {a,b,c}* }c. {anbncn ∣ n ≥ 0 }d. {w ∣ w is a palindrome over {a,b,c} }Note: wR is the string obtained by reversing ‘w‘(A) a(B) b(C) c(D) d |
| Answer» | |
| 13. |
An operating system contains 3 user processes each requiring 2 units of resource R. The minimum number of units of R such that no deadlocks will ever arise is(A) 3(B) 5(C) 4(D) 6 |
| Answer» | |
| 14. |
Which one of the following is not decidable?(A) Given a Turing machine M, a string s and an integer k, M accepts s within k steps(B) Equivalence of two given Turing machines(C) Language accepted by a given finite state machine is not empty(D) Language generated by a context free grammar is non-empty |
| Answer» | |
| 15. |
Let T(n) be the function defined by T(1)= 1, T(n)= 2T (⌊n/2⌋) +√n for n≥2. Which of the following statement(s) is true?a. T(n) = O(√n)b. T(n) = O(n)c. T(n) = O(log n)d. None of the above(A) a(B) b(C) c(D) d |
| Answer» | |
| 16. |
The trapezoidal method to numerically obtain b∫af(x) dx has an error E bounded by ((b-a)/12)h2 max f ”(x), x∈ [a,b]where h is the width of the trapezoids. The minimum number of trapezoids guaranteed to ensure E≤ 10-4 in computing ln 7using f= 1/x is(A) 60(B) 100(C) 600(D) 10,000 |
| Answer» | |
| 17. |
Given the following Pascal-like program segmentProcedure A; x,y:integer; Procedure B; x,z:real S1 end B; Procedure C; i:integer; S2 end C;end A;The variables accessible in S1 and S2 are(A) x of A, y, x of B and z in S1 and x of B, y and i in S2(B) x of B, y and z in S1 and x of B, i and z in S2(C) x of B, z and y in S1 and x of A, i and y in S2(D) None of the above |
| Answer» | |
| 18. |
The expression (a*b)* c op……..where ‘op’ is one of ‘+‘, ‘*‘ and ‘↑‘ (exponentiation) can be evaluated on a CPU with a single register without storing the value of (a * b) if(A) ‘op’ is ‘+’ or ‘*’(B) ‘op’ is ‘↑’ or ‘*’(C) ‘op’ is ‘↑’ or ‘+’(D) not possible to evaluate without storing |
| Answer» None | |
| 19. |
A priority queue Q is used to implement a stack S that stores characters. PUSH(C) is implemented as INSERT(Q, C, K) where K is an appropriate integer key chosen by the implementation. POP is implemented as DELETEMIN(Q). For a sequence of operations, the keys chosen are in(A) Non-increasing order(B) Non-decreasing order(C) strictly increasing order(D) strictly decreasing order |
| Answer» | |
| 20. |
Let f(x, y, z) = x’ + y’x + xzbe a switching function. Which one of the following is valid?(A) y’z is a prime implicant of f(B) xz is a minterm of f(C) xz is an implicant of f(D) y is a prime implicant of f |
| Answer» | |
| 21. |
Contents of A register after the execution of the following 8085 microprocessor program isMVI A, 55 HMVI C, 25 HADD CDAA(A) 7AH(B) 80H(C) 50H(D) 22H |
| Answer» | |
| 22. |
For a database relation R(a,b,c,d), where the domains a, b, c, d include only atomic values, only the following functional dependencies and those that can be inferred from them hold:{ a → c, b → d } This relation is(A) in first normal form but not in second normal form(B) in second normal form but not in first normal form(C) in third normal form(D) None of the above |
| Answer» | |
| 23. |
RST 7.5 interrupt in 8085 microprocessor executes the interrupt service routine from interrupt vector location(A) 0000H(B) 0075H(C) 003CH(D) 0034H |
| Answer» | |
| 24. |
A polynomial p(x) is such that p(0) =5, p(1) =4, p(2) =9 and p(3) =20. The minimum degree it can have is(A) 1(B) 2(C) 3(D) 4 |
| Answer» | |
| 25. |
The probability that it will rain today is 0.5. The probability that it will rain tomorrow is 0.6. The probability that it will rain either today or tomorrow is 0.7. What is the probability that it will rain today and tomorrow?(A) 0.3(B) 0.25(C) 0.35(D) 0.4 |
| Answer» None | |
| 26. |
Thrashing(A) reduces page I/O(B) decreases the degree of multiprogramming(C) implies excessive page I/O(D) improves the system performance |
| Answer» | |
| 27. |
Purpose of a start bit in R8232 serial communication protocol is(A) to synchronize receiver for receiving every byte(B) to synchronize receiver for receiving a sequence of bytes(C) a parity bit(D) to synchronize receiver for receiving the last byte |
| Answer» | |
| 28. |
The correct matching for the following pairs is(A) DMA I/O (1) High speed RAM(B) Cache (2) Disk(C) Interrupt I/O (3) Printer(D) Condition Code Register (4) ALUCodes: A B C D a 4 3 1 2b 2 1 3 4c 4 3 2 1d 2 3 4 1(A) a(B) b(C) c(D) d |
| Answer» | |
| 29. |
An N-bit carry look ahead adder, where N is a multiple of 4, employs ICs 74181 (4 bit ALU) and 74182 (4 bit carry look ahead generator).The minimum addition time using the best architecture for this adder is(A) proportional to N(B) proportional to logN(C) a constant(D) none of the above |
| Answer» | |
| 30. |
In a lattice defined by the Hasse diagram given in figure 3.3, how many complements does the element ‘e’ have?(A) 2(B) 3(C) 0(D) 1 |
| Answer» | |
| 31. |
Locality of reference implies that the page reference being made by a process(A) will always be to the page used in the previous page reference(B) is likely to be to one of the pages used in the last few page references(C) will always be to one of the pages existing in memory(D) will always lead to a page fault |
| Answer» | |
| 32. |
Let (Z, *)be an algebraic structure where Z is the set of integers and the operation ∗ is defined by n ∗ m = max(n . m). Which of the following statements is true for (Z, *)?(A) (Z, *) is a monoid(B) (Z, *) is an Abelian group(C) (Z, *) is a group(D) None of the above |
| Answer» | |
| 33. |
Which of the following propositions is a tautology?(A) (p∨ q)→ p(B) p∨ (q → p)(C) p∨ (p → q)(D) p → (p → q) |
| Answer» | |
| 34. |
Given∑ = {a, b}, which of the following sets is not countable ?(A) Set of all strings over∑(B) Set of all languages over ∑(C) Set of all regular languages over∑(D) Set of all languages over∑ accepted by Turing machines |
| Answer» | |
| 35. |
In the following grammarX :: = X ⊕ Y / YY :: = Z * Y / ZZ :: = idWhich of the following is true?a. ‘⊕’ is left associative while ‘*’ is right associativeb. Both ‘⊕’ and ‘*’ are left associativec. ‘⊕’ is right associative while ‘*’ is left associatived. None of the above(A) a(B) b(C) c(D) d |
| Answer» | |
| 36. |
The correct matching for the following pairs is(A) Disk Scheduling (1) Round robin(B) Batch Processing (2) SCAN(C) Time sharing (3) LIFO(D) Interrupt processing (4) FIFOCodes: A B C Da 3 4 2 1b 4 3 2 1c 2 4 1 3d 3 4 3 2(A) a(B) b(C) c(D) d |
| Answer» | |
| 37. |
Which of the following is essential for converting an infix expression to the postfix from efficiently ?(A) An operator stack(B) An operand stack(C) An operand stack and an operator stack(D) A parse tree |
| Answer» | |
| 38. |
I/O redirection(A) implies changing the name of a file(B) can be employed to use an existing file as input file for a program(C) implies connecting two programs through a pipe(D) none of the above |
| Answer» | |
| 39. |
When an interrupt occurs, an operating system(A) ignores the interrupt(B) always changes state of interrupted process to ‘blocked’ and schedules another process(C) always resumes execution of interrupted process after processing the interrupt(D) may change the state of interrupted process to ‘blocked’and schedule another process |
| Answer» | |
| 40. |
A language L allows declaration of arrays whose sizes are not known during compilation. It is required to make efficient use of memory. Which of the following is true?(A) A compiler using static memory allocation can be written for L(B) A compiler cannot be written for L, an interpreter must be used(C) A compiler using dynamic memory allocation can be written for L(D) None of the above |
| Answer» | |
| 41. |
Each Process Pi, i= 1…….9 is coded as follows repeat P(mutex) {Critical section} V(mutex) foreverThe code for P10 is identical except it uses V(mutex) in place of P(mutex). What is the largest number of processes that can be inside the critical section at any moment?(A) 1(B) 2(C) 3(D) None of above |
| Answer» | |