GATE 2022 CS question paper PDF and answer key

The official GATE 2022 Computer Science & Information Technology paper, organised by IIT Kharagpur: 65 questions for 100 marks in 3 hours. Download the official question paper and answer key as PDFs. Below is how the marks were split by topic, the complete official answer key and 5 questions solved step by step.

Source: the official paper and answer key published by IIT Kharagpur for GATE 2022 (official GATE site). Spotted a mistake? Email team@lemyte.com.

General Aptitude
10 · 15 marks
Computer Science & Information Technology
55 · 85 marks
MCQ / MSQ / NAT
32 / 15 / 18
Marks to all
None

Where the marks were

GATE 2022 CS topic-wise marks

Computer Science & Information Technology questions only; General Aptitude adds 15 marks on top. The top three topics carried 36 of the 85 subject marks.

TopicQuestionsMarks
Discrete Mathematics915
Computer Organization and Architecture711
Programming and Data Structures710
Computer Networks610
Operating System58
Theory of Computation58
Databases57
Linear Algebra35
Compiler Design34
Digital Logic23
Algorithms23
Calculus11

Free solved questions

5 solved questions from GATE 2022 CS

Question text and figures as in the official paper, the answer from the official key, and a worked solution. The other 60 solutions are in your report after you take the paper.

Q1 · General Aptitude · MCQ · 1 mark

The _________ is too high for it to be considered _________.

  • (A)
    fair / fare
  • (B)
    faer / fair
  • (C)
    fare / fare
  • (D)
    fare / fair

Answer (official key): D

Solution

“Fare” means price or charge, while “fair” means reasonable.

So the correct sentence is:

The fare is too high for it to be considered fair.

Therefore, the correct answer is Option D.

Q10 · General Aptitude · MCQ · 2 marks

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 from the box one at a time. If a green ball is drawn, it is not replaced. If an orange ball is drawn, it is replaced with another orange ball.

First ball is drawn. What is the probability of getting an orange ball in the next draw?

  • (A)
    12\frac{1}{2}
  • (B)
    825\frac{8}{25}
  • (C)
    1950\frac{19}{50}
  • (D)
    2350\frac{23}{50}

Answer (official key): D

Solution

Use total probability.

If the first ball is green:

  • probability = 35\frac{3}{5}
  • green is not replaced, so next orange probability = 24=12\frac{2}{4} = \frac{1}{2}

If the first ball is orange:

  • probability = 25\frac{2}{5}
  • orange is replaced with another orange, so composition stays the same
  • next orange probability = 25\frac{2}{5}

Hence,

P(orange on next draw)=35⋅12+25⋅25=310+425=1550+850=2350.P(\text{orange on next draw}) = \frac{3}{5}\cdot\frac{1}{2} + \frac{2}{5}\cdot\frac{2}{5} = \frac{3}{10}+\frac{4}{25} = \frac{15}{50}+\frac{8}{50} = \frac{23}{50}.

Therefore, the correct answer is Option D.

Q49 · Theory of Computation · MSQ · 2 marks

Which of the following is/are undecidable?

  • (A)
    Given two Turing machines M1M_1 and M2M_2, decide if L(M1)=L(M2)L(M_1) = L(M_2).
  • (B)
    Given a Turing machine MM, decide if L(M)L(M) is regular.
  • (C)
    Given a Turing machine MM, decide if MM accepts all strings.
  • (D)
    Given a Turing machine MM, decide if MM takes more than 10731073 steps on every string.

Answer (official key): A, B, C

Solution

  • (A) is undecidable: equivalence of Turing machine languages is undecidable.
  • (B) is undecidable by Rice’s theorem, since regularity is a non-trivial semantic property of the language recognized by a Turing machine.
  • (C) is undecidable: deciding whether a Turing machine accepts all strings is the universality problem.

But (D) is decidable because the bound 10731073 is a fixed constant. A machine cannot inspect arbitrarily much input in at most 10731073 steps, so one can effectively analyze all relevant bounded computations and decide the property.

Therefore, the correct answers are A, B and C.

Q51 · Computer Networks · Numerical · 2 marks

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 bits required for the sequence number field of the TCP header, to prevent the sequence number space from wrapping around during the MSL is____________.

Answer (official key): 33

Solution

TCP sequence numbers count bytes, not bits.

At 1 Gbps,

1 Gbps=1098=125×106 bytes/sec.1 \text{ Gbps} = \frac{10^9}{8} = 125 \times 10^6 \text{ bytes/sec}.

In 60 seconds, the maximum number of bytes sent is

125×106×60=7.5×109.125 \times 10^6 \times 60 = 7.5 \times 10^9.

We need

2n>7.5×109.2^n > 7.5 \times 10^9.

Now,

232≈4.29×109<7.5×109,2^{32} \approx 4.29 \times 10^9 < 7.5 \times 10^9,

but

233≈8.59×109>7.5×109.2^{33} \approx 8.59 \times 10^9 > 7.5 \times 10^9.

Hence the minimum number of bits required is

33.33.

Therefore, the answer is 33.

Q61 · Computer Networks · Numerical · 2 marks

Consider a network with three routers P, Q, R shown in the figure below. All the links have cost of unity.

The routers exchange distance vector routing information and have converged on the routing tables, after which the link Q−R fails. Assume that P and Q send out routing updates at random times, each at the same average rate. The probability of a routing loop formation (rounded off to one decimal place) between P and Q, leading to count-to-infinity problem, is _____________.

Network for Q57

Answer (official key): 0.5

Solution

Before failure, router PP reaches RR via QQ.

After link Q−RQ-R fails:

  • if Q informs P first, then PP updates correctly and no loop forms
  • if P sends its stale route to Q first, then Q may believe that R is reachable through P, and a loop forms

Since P and Q send updates at random times with the same average rate, each of these two cases is equally likely.

So the probability of loop formation is

12=0.5.\frac{1}{2}=0.5.

Therefore, the answer is 0.5.

The other 60 questions are solved in your report when you take GATE 2022 CS as a 3-hour test.

Take GATE 2022 CS as a test

Official answer key

GATE 2022 CS answer key

All 65 answers from the official key. Numerical answers are ranges; “or” means the key accepts either answer.

Download the official GATE 2022 CS answer key (PDF)
QTopicTypeMarksAnswer
1Verbal AptitudeMCQ1D
2Analytical AptitudeMCQ1B
3Analytical AptitudeMCQ1A
4Quantitative AptitudeMCQ1D
5Quantitative AptitudeMCQ1C
6Verbal AptitudeMCQ2B
7Analytical AptitudeMCQ2D
8Analytical AptitudeMCQ2D
9Analytical AptitudeMCQ2B
10Quantitative AptitudeMCQ2D
11Computer Organization and ArchitectureMCQ1A
12DatabasesMCQ1A
13Operating SystemMCQ1C
14Programming and Data StructuresMCQ1A
15Programming and Data StructuresMCQ1B
16Theory of ComputationMCQ1D
17Digital LogicMCQ1B
18AlgorithmsMCQ1A
19Linear AlgebraMCQ1C
20Compiler DesignMCQ1D
21Programming and Data StructuresNumerical1509
22Computer Organization and ArchitectureMSQ1A, B, D
23Compiler DesignNumerical15
24Theory of ComputationMSQ1B, C, D
25Discrete MathematicsNumerical136
26Programming and Data StructuresMCQ1D
27Discrete MathematicsMSQ1A, B, C
28Operating SystemMSQ1A, D
29Computer NetworksMCQ1C
30DatabasesMSQ1A, B
31DatabasesNumerical18
32CalculusNumerical1-0.5
33Computer Organization and ArchitectureNumerical10.85
34Discrete MathematicsNumerical17
35Computer NetworksNumerical14
36Discrete MathematicsMCQ2D
37Discrete MathematicsMCQ2A
38Digital LogicMCQ2C
39Computer Organization and ArchitectureMCQ2C
40DatabasesMCQ2A
41Theory of ComputationMSQ2A, B, C
42Programming and Data StructuresMCQ2A
43Programming and Data StructuresMCQ2A
44Operating SystemMCQ2D
45Discrete MathematicsMSQ2A, B, C
46Theory of ComputationMSQ2B, C, D
47AlgorithmsMSQ2A, B, C
48Linear AlgebraMCQ2D
49Theory of ComputationMSQ2A, B, C
50Computer Organization and ArchitectureMCQ2B
51Computer NetworksNumerical233
52Computer NetworksMSQ2B, D
53Computer NetworksNumerical27.07 to 7.09
54Computer Organization and ArchitectureMSQ2A, B, D
55Operating SystemNumerical2153
56Compiler DesignNumerical280
57Programming and Data StructuresNumerical20
58Discrete MathematicsMSQ2A
59DatabasesNumerical22
60Computer Organization and ArchitectureNumerical21.42 to 1.45
61Computer NetworksNumerical20.5
62Linear AlgebraMSQ2A, C, D
63Discrete MathematicsNumerical224
64Discrete MathematicsMSQ2A, B, C
65Operating SystemNumerical20.6

Questions about GATE 2022 CS

How many questions are in the GATE 2022 CS paper?

65 questions for 100 marks: 10 General Aptitude questions worth 15 marks and 55 Computer Science & Information Technology questions worth 85 marks. By type, there were 32 MCQs, 15 MSQs, 18 numerical answer (NAT) questions. The paper lasted 3 hours.

Is there negative marking in GATE 2022 CS?

Yes, for MCQs only. A wrong MCQ answer costs one-third of its marks (−⅓ for a 1-mark question, −⅔ for a 2-mark question). MSQ and numerical (NAT) questions have no negative marking, and an MSQ earns marks only when every correct option is chosen.

Which topics carried the most marks in GATE 2022 CS?

Outside General Aptitude, the biggest topics were Discrete Mathematics (15 marks), Computer Organization and Architecture (11 marks), Programming and Data Structures (10 marks). The full topic-wise split is in the table on this page.

Were any GATE 2022 CS questions awarded marks to all?

No. Every question was graded with the answer in the official key.

Where does this GATE 2022 CS answer key come from?

From the official answer key published by IIT Kharagpur, which organised GATE 2022. Range answers for numerical questions and questions with more than one accepted answer are kept exactly as the key gives them.

More GATE papers