Old Question Papers in Quiz Form

Your one-stop solution for accessing old question papers in a quiz format.

Gate 2022 - Quiz

1. If '→' denotes increasing order of intensity, then the meaning of the words [dry → arid → parched] is analogous to [diet → fast → ________ ]. Which one of the given options is appropriate to fill the blank?

  • starve
  • reject
  • feast
  • deny

2. If two distinct non-zero real variables x and y are such that (x + y) is proportional to (x − y) then the value of x/y

  • depends on xy
  • depends only on x and not on y
  • depends only on y and not on x
  • is a constant

3. Consider the following sample of numbers: 9, 18, 11, 14, 15, 17, 10, 69, 11, 13. The median of the sample is

  • 13.5
  • 14
  • 11
  • 18.7

4. The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins is

  • 21%
  • 14 2/7%
  • 10%
  • 30%

5. For positive non-zero real variables p and q, if log(p² + q²) = log p + log q + 2 log 3, then, the value of (p⁴ + q⁴)/(p²q²) is

  • 79
  • 81
  • 9
  • 83

6. In the given text, the blanks are numbered (i)−(iv). Select the best match for all the blanks. Steve was advised to keep his head (i) before heading (ii) to bat; for, while he had a head (iii) batting, he could only do so with a cool head (iv) his shoulders.

  • (i) down (ii) down (iii) on (iv) for
  • (i) on (ii) down (iii) for (iv) on
  • (i) down (ii) out (iii) for (iv) on
  • (i) on (ii) out (iii) on (iv) for

7. A rectangular paper sheet of dimensions 54 cm × 4 cm is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube whose surface area is equal to the area of the sheet is also taken. Then, the ratio of the volume of the cylindrical tube to the volume of the cube is

  • 1/π
  • 2/π
  • 3/π
  • 4/π

8. The pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person. The typical energy density (kcal/g) of these macronutrients is given in the table. The total fat (all three types), in grams, this person consumes is

  • 44.4
  • 77.8
  • 100
  • 3,600

9. A rectangular paper of 20 cm × 8 cm is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter of the final folded sheet (in cm) is

  • 18
  • 24
  • 20
  • 21

10. The least number of squares to be added in the figure to make AB a line of symmetry is

  • 6
  • 4
  • 5
  • 7

11. Let f: ℝ → ℝ be a function such that f(x) = max{x, x³}, x ∈ ℝ, where ℝ is the set of all real numbers. The set of all points where f(x) is NOT differentiable is

  • {−1, 1, 2}
  • {−2, −1, 1}
  • {0, 1}
  • {−1, 0, 1}

12. The product of all eigenvalues of the matrix [1 2 3; 4 5 6; 7 8 9] is

  • −1
  • 0
  • 1
  • 2

13. Consider a system that uses 5 bits for representing signed integers in 2's complement format. In this system, two integers A and B are represented as A=01010 and B=11010. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?

  • A + B
  • A − B
  • B − A
  • 2 * B

14. Consider a permutation sampled uniformly at random from the set of all permutations of {1, 2, 3, ⋯, n} for some n ≥ 4. Let X be the event that 1 occurs before 2 in the permutation, and Y the event that 3 occurs before 4. Which one of the following statements is TRUE?

  • The events X and Y are mutually exclusive
  • The events X and Y are independent
  • Either event X or Y must occur
  • Event X is more likely than event Y

15. Which one of the following statements is FALSE?

  • In the cycle stealing mode of DMA, one word of data is transferred between an I/O device and main memory in a stolen cycle
  • For bulk data transfer, the burst mode of DMA has a higher throughput than the cycle stealing mode
  • Programmed I/O mechanism has a better CPU utilization than the interrupt driven I/O mechanism
  • The CPU can start executing an interrupt service routine faster with vectored interrupts than with non-vectored interrupts

16. A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user's computer in some order. (i) HTTP GET request for the index page (ii) DNS request to resolve the web server's name to its IP address (iii) HTTP GET request for an image object (iv) TCP SYN to open a connection to the web server. Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer?

  • (iv), (ii), (iii), (i)
  • (ii), (iv), (iii), (i)
  • (ii), (iv), (i), (iii)
  • (iv), (ii), (i), (iii)

17. Given an integer array of size N, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is

  • both O(N) and Ω(N)
  • O(N) but not Ω(N)
  • Ω(N) but not O(N)
  • neither O(N) nor Ω(N)

18. Consider the following C program: #include <stdio.h> int main(){ int a = 6; int b = 0; while(a < 10) { a = a / 12 + 1; a += b;} printf("%d", a); return 0;} Which one of the following statements is CORRECT?

  • The program prints 9 as output
  • The program prints 10 as output
  • The program gets stuck in an infinite loop
  • The program prints 6 as output

19. Consider the following C program: #include <stdio.h> void fX(); int main(){ fX(); return 0;} void fX(){ char a; if((a=getchar()) != '\n') fX(); if(a != '\n') putchar(a);} Assume that the input to the program from the command line is 1234 followed by a newline character. Which one of the following statements is CORRECT?

  • The program will not terminate
  • The program will terminate with no output
  • The program will terminate with 4321 as output
  • The program will terminate with 1234 as output

20. Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?

  • (i)
  • (ii)
  • (iii)
  • (iv)

21. In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?

  • Only the root node
  • All leaf nodes
  • All internal nodes
  • Only the leftmost leaf node

22. Which of the following statements about a relation R in first normal form (1NF) is/are TRUE?MCA

  • R can have a multi-attribute key
  • R cannot have a foreign key
  • R cannot have a composite attribute
  • R cannot have more than one candidate key

23. Let L₁, L₂ be two regular languages and L₃ a language which is not regular. Which of the following statements is/are always TRUE?MCA

  • L₁ = L₂ if and only if L₁ ∩ L₂̅ = φ
  • L₁ ∪ L₃ is not regular
  • L₃̅ is not regular
  • L₁̅ ∪ L₂̅ is regular

24. Which of the following statements about threads is/are TRUE?MCA

  • Threads can only be implemented in kernel space
  • Each thread has its own file descriptor table for open files
  • All the threads belonging to a process share a common stack
  • Threads belonging to a process are by default not protected from each other

25. Which of the following process state transitions is/are NOT possible?MCA

  • Running to Ready
  • Waiting to Running
  • Ready to Waiting
  • Running to Terminated

26. Which of the following is/are Bottom-Up Parser(s)?MCA

  • Shift-reduce Parser
  • Predictive Parser
  • LL(1) Parser
  • LR Parser

27. Let A and B be two events in a probability space with P(A) = 0.3, P(B) = 0.5, and P(A ∩ B) = 0.1. Which of the following statements is/are TRUE?MCA

  • The two events A and B are independent
  • P(A ∪ B) = 0.7
  • P(A ∩ Bᶜ) = 0.2, where Bᶜ is the complement of the event B
  • P(Aᶜ ∩ Bᶜ) = 0.4, where Aᶜ and Bᶜ are the complements of the events A and B, respectively

28. Consider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires have no delays. Which of the following statements about the circuit is/are CORRECT?MCA

  • With no propagation delays, the output Y is always logic Zero
  • With no propagation delays, the output Y is always logic One
  • With propagation delays, the output Y can have a transient logic One after X transitions from logic Zero to logic One
  • With propagation delays, the output Y can have a transient logic Zero after X transitions from logic One to logic Zero

29. TCP client P successfully establishes a connection to TCP server Q. Let Nₚ denote the sequence number in the SYN sent from P to Q. Let Nᵨ denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?MCA

  • The sequence number Nₚ is chosen randomly by P
  • The sequence number Nₚ is always 0 for a new connection
  • The acknowledgement number Nᵨ is equal to Nₚ
  • The acknowledgement number Nᵨ is equal to Nₚ + 1

30. Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the following statements about forwarding is/are CORRECT?MCA

  • In a pipelined execution, forwarding means the result from a source stage of an earlier instruction is passed on to the destination stage of a later instruction
  • In forwarding, data from the output of the MEM stage can be passed on to the input of the EX stage of the next instruction
  • Forwarding cannot prevent all pipeline stalls
  • Forwarding does not require any extra hardware to retrieve the data from the pipeline stages

31. Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?MCA

  • Source IP
  • Destination IP
  • Header Checksum
  • Total Length

32. Let A and B be non-empty finite sets such that there exist one-to-one and onto functions (i) from A to B and (ii) from A × A to A ∪ B. The number of possible values of |A| is

33. Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below. Operator + (Highest precedence, Left associativity), - (High precedence, Right associativity), * (Medium precedence, Right associativity), / (Low precedence, Right associativity). The value of the expression 3 + 1 + 5 * 2 / 7 + 2 − 4 − 7 − 6 / 2 as per the above rules is

34. The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is

35. Consider the following two relations, R(A,B) and S(A,C): R: A=10,B=20; A=20,B=30; A=30,B=40; A=30,B=50; S: A=10,C=90; A=30,C=45; A=40,C=80; A=50,C=95. The total number of tuples obtained by evaluating the following expression σ_{B<C}(R ⋈_{R.A=S.A} S) is

36. Consider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size 10⁶ bytes to R via this path by splitting the file into chunks of 10³ bytes each. Node P sends these chunks one after the other without any wait time between the successive chunk transmissions. Assume that the size of extra headers added to these chunks is negligible, and that the chunk size is less than the MTU. Each of the links P—Q and Q—R has a bandwidth of 10⁶ bits/sec, and negligible propagation latency. Router Q immediately transmits every packet it receives from P to R, with negligible processing and queueing delays. Router Q can simultaneously receive on link P—Q and transmit on link Q—R. Assume P starts transmitting the chunks at time t = 0. Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which R receives all the chunks of the file?

  • 8.000
  • 8.008
  • 15.992
  • 16.000

37. Consider the following syntax-directed definition (SDD). S → DHTU { S.val = D.val + H.val + T.val + U.val; } D → "M"D₁ { D.val = 5 + D₁.val; } D → ε { D.val = −5; } H → "L"H₁ { H.val = 5 * 10 + H₁.val; } H → ε { H.val = −10; } T → "C"T₁ { T.val = 5 * 100 + T₁.val; } T → ε { T.val = −5; } U → "K" { U.val = 5; } Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val)?

  • 45
  • 50
  • 55
  • 65

38. Consider the following grammar G, with S as the start symbol. The grammar G has three incomplete productions denoted by (1), (2), and (3). S → daT | (1) T → aS | bT | (2) R → (3) | ε The set of terminals is {a, b, c, d, f}. The FIRST and FOLLOW sets of the different non-terminals are as follows. FIRST(S) = {c, d, f}, FIRST(T) = {a, b, ε}, FIRST(R) = {c, ε} FOLLOW(S) = FOLLOW(T) = {c, f, $}, FOLLOW(R) = {f} Which one of the following options CORRECTLY fills in the incomplete productions?

  • (1) S → Rf (2) T → ε (3) R → cTR
  • (1) S → fR (2) T → ε (3) R → cTR
  • (1) S → fR (2) T → cT (3) R → cR
  • (1) S → Rf (2) T → cT (3) R → cR

39. Consider the following pseudo-code. L1: t1 = −1 L2: t2 = 0 L3: t3 = 0 L4: t4 = 4 * t3 L5: t5 = 4 * t2 L6: t6 = t5 * M L7: t7 = t4 + t6 L8: t8 = a[t7] L9: if t8 <= max goto L11 L10: t1 = t8 L11: t3 = t3 + 1 L12: if t3 < M goto L4 L13: t2 = t2 + 1 L14: if t2 < N goto L3 L15: max = t1 Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively?

  • 6 and 6
  • 6 and 7
  • 7 and 7
  • 7 and 6

40. Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a = b = 1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption. T1: a = a + 1; b = b + 1; T2: b = 2 * b; a = 2 * a; Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?

  • (a = 4, b = 4); (a = 3, b = 3); (a = 4, b = 3)
  • (a = 3, b = 4); (a = 4, b = 3); (a = 3, b = 3)
  • (a = 4, b = 4); (a = 4, b = 3); (a = 3, b = 4)
  • (a = 2, b = 2); (a = 2, b = 3); (a = 3, b = 4)

41. An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?

  • 82, 90, 101
  • 82, 11, 93
  • 131, 11, 93
  • 131, 111, 90

42. Consider the following recurrence relation: T(n) = √n T(√n) + n for n ≥ 1, 1 for n = 1. Which one of the following options is CORRECT?

  • T(n) = Θ(n log log n)
  • T(n) = Θ(n log n)
  • T(n) = Θ(n² log n)
  • T(n) = Θ(n² log log n)

43. Consider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of k is

  • 53
  • 52
  • 27
  • 1