The GATE Grind

GATE 2022 CS – Previous Year Questions with Solutions

All 65 questions of GATE 2022 CS with answers and explanations. Read each question, then practise it by topic or as a full paper.

Practise this paper in The GATE Grind →

  1. Question 1 (1 mark, Multiple choice) – The is too high for it to be considered .
  2. Question 2 (1 mark, Multiple choice) – A function y(x) is defined in the interval [0,1] on the x-axis as y(x)=cases2 & 0 x<13\\ 3 & 13 x<34\\ 1 & 34 x 1cases Which one of the following is…
  3. Question 3 (1 mark, Multiple choice) – Let r be a root of the equation x2+2x+6=0. Then the value of the expression (r+2)(r+3)(r+4)(r+5) is
  4. Question 4 (1 mark, Multiple choice) – Given below are four statements. Statement 1: All students are inquisitive. Statement 2: Some students are inquisitive. Statement 3: No student is…
  5. Question 5 (1 mark, Multiple choice) – A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has two plates painted with the letters A and D. From…
  6. Question 6 (2 marks, Multiple choice) – Some people believe that “what gets measured, improves”. Some others believe that “what gets measured, gets gamed”. One possible reason for the…
  7. Question 7 (2 marks, Multiple choice) – In a recently conducted national entrance test, boys constituted 65% of those who appeared for the test. Girls constituted the remaining candidates…
  8. Question 8 (2 marks, Multiple choice) – A box contains five balls of same size and shape. Three of them are green coloured balls and two of them are orange coloured balls. Balls are drawn…
  9. Question 9 (2 marks, Multiple choice) – The corners and mid-points of the sides of a triangle are named using the distinct letters P, Q, R, S, T and U, but not necessarily in the same order.…
  10. Question 10 (2 marks, Multiple choice) – A plot of land must be divided between four families. They want their individual plots to be similar in shape, not necessarily equal in area. The land…
  11. Question 11 (1 mark, Multiple choice) – Which one of the following statements is TRUE for all positive functions f(n)?
  12. Question 12 (1 mark, Multiple choice) – Which one of the following regular expressions correctly represents the language of the finite automaton given below?
  13. Question 13 (1 mark, Multiple choice) – Which one of the following statements is TRUE?
  14. Question 14 (1 mark, Multiple choice) – In a relational data model, which one of the following statements is TRUE?
  15. Question 15 (1 mark, Multiple choice) – Consider the problem of reversing a singly linked list. To take an example, given the linked list a → b → c → d → e, the reversed linked list should…
  16. Question 16 (1 mark, Multiple choice) – Suppose we are given n keys, m hash table slots, and two simple uniform hash functions h 1 and h 2. Further suppose our hashing scheme uses h 1 for…
  17. Question 17 (1 mark, Multiple choice) – Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
  18. Question 18 (1 mark, Multiple choice) – Let R1 and R2 be two 4-bit registers that store numbers in 2’s complement form. For the operation R1+R2, which one of the following values of R1 and…
  19. Question 19 (1 mark, Multiple choice) – Consider the following threads, T1, T2, and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2, and S3,…
  20. Question 20 (1 mark, Multiple choice) – Consider the following two statements with respect to the matrices A m n, B n m, C n n and D n n. Statement 1: tr(AB) = tr(BA) Statement 2: tr(CD) =…
  21. Question 21 (1 mark, Multiple choice) – What is printed by the following ANSI C program?
  22. Question 22 (1 mark, Multiple choice) – Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below. [Figure: the…
  23. Question 23 (1 mark, Multiple select) – Which of the following statements is/are TRUE?
  24. Question 24 (1 mark, Multiple select) – Let WB and WT be two set associative cache organizations that use LRU algorithm for cache block replacement. WB is a write back cache and WT is a…
  25. Question 25 (1 mark, Multiple select) – Consider the following three relations in a relational database. Employee(eId, Name), Brand(bId, bName), Own(eId, bId) Which of the following…
  26. Question 26 (1 mark, Multiple select) – Which of the following statements is/are TRUE with respect to deadlocks?
  27. Question 27 (1 mark, Multiple select) – Which of the following statements is/are TRUE for a group G?
  28. Question 28 (1 mark, Numerical answer) – Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary…
  29. Question 29 (1 mark, Numerical answer) – Consider the augmented grammar with \+, *, (, ), id\ as the set of terminals. S' S S S+R R R R*P P P (S) id If I 0 is the set of two LR(0) items \[S'…
  30. Question 30 (1 mark, Numerical answer) – Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is .
  31. Question 31 (1 mark, Numerical answer) – Consider a relation R(A,B,C,D,E) with the following three functional dependencies. AB C; BC D; C E; The number of superkeys in the relation R is .
  32. Question 32 (1 mark, Numerical answer) – The number of arrangements of six identical balls in three identical bins is .
  33. Question 33 (1 mark, Numerical answer) – A cache memory that has a hit rate of 0.8 has an access latency 10 ns and miss penalty 100 ns. An optimization is done on the cache to reduce the miss…
  34. Question 34 (1 mark, Numerical answer) – The value of the following limit is . x0+x1-e2x
  35. Question 35 (1 mark, Numerical answer) – Consider the resolution of the domain name www.gate.org.in by a DNS resolver. Assume that no resource records are cached anywhere across the DNS…
  36. Question 36 (2 marks, Multiple choice) – Which one of the following is the closed form for the generating function of the sequence \a n\ n0 defined below? a n=casesn+1, & n is odd\\ 1, &…
  37. Question 37 (2 marks, Multiple choice) – Consider a simple undirected unweighted graph with at least three vertices. If A is the adjacency matrix of the graph, then the number of 3-cycles in…
  38. Question 38 (2 marks, Multiple choice) – Which one of the following statements is FALSE?
  39. Question 39 (2 marks, Multiple choice) – Let R i(z) and W i(z) denote read and write operations on a data element z by a transaction T i, respectively. Consider the schedule S with four…
  40. Question 40 (2 marks, Multiple choice) – Consider a digital display system (DDS) shown in the figure that displays the contents of register X. A 16-bit code word is used to load a word in X,…
  41. Question 41 (2 marks, Multiple choice) – Consider three floating point numbers A, B and C stored in registers R A, R B and R C, respectively as per IEEE-754 single precision floating point…
  42. Question 42 (2 marks, Multiple choice) – Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the…
  43. Question 43 (2 marks, Multiple choice) – What is printed by the following ANSI C program?
  44. Question 44 (2 marks, Multiple choice) – What is printed by the following ANSI C program? ASCII: A–Z = 65–90, a–z = 97–122, '*' = 42, '+' = 43, '−' = 45.
  45. Question 45 (2 marks, Multiple choice) – Consider solving the following system of simultaneous equations using LU decomposition. x 1+x 2-2x 3=4 x 1+3x 2-x 3=7 2x 1+x 2-5x 3=7 where L and U…
  46. Question 46 (2 marks, Multiple select) – Which of the following is/are undecidable?
  47. Question 47 (2 marks, Multiple select) – Consider the following languages: L 1=\anwan w\a,b\*\ L 2=\wxwR w,x\a,b\*, w , x >0\ Note that wR is the reversal of the string w. Which of the…
  48. Question 48 (2 marks, Multiple select) – Consider the following languages: L 1=\ww w\a,b\*\ L 2=\anbncm m,n0\ L 3=\ambncn m,n0\ Which of the following statements is/are FALSE?
  49. Question 49 (2 marks, Multiple select) – Consider a simple undirected weighted graph G, all of whose edge weights are distinct. Which of the following statements about the minimum spanning…
  50. Question 50 (2 marks, Multiple select) – The following simple undirected graph is referred to as the Peterson graph. [Figure: the standard Petersen graph on 10 vertices.] Which of the…
  51. Question 51 (2 marks, Multiple select) – Consider the following recurrence: f(1)=1; f(2n)=2f(n)-1, for n1; f(2n+1)=2f(n)+1, for n1. Then, which of the following statements is/are TRUE?
  52. Question 52 (2 marks, Multiple select) – Which of the properties hold for the adjacency matrix A of a simple undirected unweighted graph having n vertices?
  53. Question 53 (2 marks, Multiple select) – Which of the following is/are the eigenvector(s) for the matrix given below? pmatrix-9&-6&-2&-4\\-8&-6&-3&-1\\20&15&8&5\\32&21&7&12pmatrix
  54. Question 54 (2 marks, Multiple select) – Consider a system with 2 KB direct mapped data cache with a block size of 64 bytes. The system has a physical address space of 64 KB and a word length…
  55. Question 55 (2 marks, Multiple select) – Consider routing table of an organization’s router shown below: Subnet Number Subnet Mask Next Hop 12.20.164.0 255.255.252.0 R1 12.20.170.0…
  56. Question 56 (2 marks, Numerical answer) – Consider the relational database with the following four schemas and their respective instances. Student(sNo, sName, dNo): (S01, James, D01), (S02,…
  57. Question 57 (2 marks, Numerical answer) – Consider a network with three routers P, Q, R connected in a line P—Q—R. All the links have cost of unity. The routers exchange distance vector…
  58. Question 58 (2 marks, Numerical answer) – Let G(V,E) be a directed graph, where V=\1,2,3,4,5\ is the set of vertices and E is the set of directed edges, as defined by the following adjacency…
  59. Question 59 (2 marks, Numerical answer) – Consider a 100 Mbps link between an earth station (sender) and a satellite (receiver) at an altitude of 2100 km. The signal propagates at a speed of…
  60. Question 60 (2 marks, Numerical answer) – Consider the data transfer using TCP over a 1 Gbps link. Assuming that the maximum segment lifetime (MSL) is set to 60 seconds, the minimum number of…
  61. Question 61 (2 marks, Numerical answer) – A processor X1 operating at 2 GHz has a standard 5-stage RISC instruction pipeline having a base CPI (cycles per instruction) of one without any…
  62. Question 62 (2 marks, Numerical answer) – Consider the queues Q 1 containing four elements (1, 2, 3, 4 with 1 at the head) and Q 2 containing none (shown as the Initial State in the figure).…
  63. Question 63 (2 marks, Numerical answer) – Consider two files systems A and B, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in…
  64. Question 64 (2 marks, Numerical answer) – Consider a demand paging system with four page frames (initially empty) and LRU page replacement policy. For the following page reference string 7, 2,…
  65. Question 65 (2 marks, Numerical answer) – Consider the following grammar along with translation rules. S S 1\ \#\ T\S.val=S 1.val * T.val\ S T\S.val=T.val\ T T 1\ \%\ R\T.val=T 1.val R.val\ T…