GATE 2024 CS (Set 2) question paper PDF and answer key

The official GATE 2024 Computer Science & Information Technology (Set 2) paper, organised by IISc Bengaluru: 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 IISc Bengaluru for GATE 2024 (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 / 18 / 15
Marks to all
None

Not in 2027 1 question (Q 56) is on topics removed from the GATE 2027 syllabus. They are marked in the answer key below. What changed for CS

Where the marks were

GATE 2024 CS (Set 2) topic-wise marks

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

TopicQuestionsMarks
Discrete Mathematics710
Computer Organization and Architecture610
Computer Networks69
Programming and Data Structures58
Databases68
Compiler Design58
Operating System58
Theory of Computation47
Digital Logic46
Algorithms35
Probability and Statistics23
Linear Algebra12
Calculus11

Free solved questions

5 solved questions from GATE 2024 CS (Set 2)

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.

Q4 · General Aptitude · MCQ · 1 mark

In the sequence

6, 9, 14, x, 30, 41,6,\ 9,\ 14,\ x,\ 30,\ 41,

a possible value of xx is

  • (A)
    25
  • (B)
    21
  • (C)
    18
  • (D)
    20

Answer (official key): B

Solution

Look at successive differences:

9−6=3,14−9=5.9-6=3,\quad 14-9=5.

Continuing with consecutive odd numbers:

+3, +5, +7, +9, +11+3,\ +5,\ +7,\ +9,\ +11

So

x=14+7=21.x = 14 + 7 = 21.

Check:

21+9=30,30+11=41.21 + 9 = 30,\qquad 30 + 11 = 41.

Therefore, the correct answer is Option B.

Q5 · General Aptitude · MCQ · 1 mark

For positive non-zero real variables xx and yy, if

ln⁡(x+y2)=12[ln⁡(x)+ln⁡(y)],\ln\left(\frac{x+y}{2}\right)=\frac{1}{2}[\ln(x)+\ln(y)],

then, the value of

xy+yx\frac{x}{y}+\frac{y}{x}

is

  • (A)
    1
  • (B)
    12\frac{1}{2}
  • (C)
    2
  • (D)
    4

Answer (official key): C

Solution

Using log rules,

ln⁡(x+y2)=12[ln⁡x+ln⁡y]=ln⁡(xy).\ln\left(\frac{x+y}{2}\right)=\frac{1}{2}[\ln x+\ln y] = \ln(\sqrt{xy}).

Hence,

x+y2=xy.\frac{x+y}{2} = \sqrt{xy}.

Squaring both sides gives

(x+y)2=4xy⇒x2−2xy+y2=0⇒(x−y)2=0.(x+y)^2 = 4xy \Rightarrow x^2 - 2xy + y^2 = 0 \Rightarrow (x-y)^2 = 0.

So

x=y.x=y.

Therefore,

xy+yx=1+1=2.\frac{x}{y}+\frac{y}{x}=1+1=2.

Therefore, the correct answer is Option C.

Q52 · Operating System · Numerical · 2 marks

Consider a 32-bit system with 4 KB page size and page table entries of size 4 bytes each. Assume 1 KB=2101\text{ KB} = 2^{10} bytes. The OS uses a 2-level page table for memory management, with the page table containing an outer page directory and an inner page table. The OS allocates a page for the outer page directory upon process creation. The OS uses demand paging when allocating memory for the inner page table, i.e., a page of the inner page table is allocated only if it contains at least one valid page table entry.

An active process in this system accesses 2000 unique pages during its execution, and none of the pages are swapped out to disk. After it completes the page accesses, let XX denote the minimum and YY denote the maximum number of pages across the two levels of the page table of the process.

The value of X+YX+Y is ________

Answer (official key): 1028

Solution

Page size is 44 KB, and each page table entry is 44 bytes, so one page-table page can store

40964=1024=210\frac{4096}{4} = 1024 = 2^{10}

entries.

Since virtual address size is 32 bits and page offset is 12 bits, VPN bits are

32−12=20.32-12=20.

Hence the 2-level split is:

  • outer index: 10 bits
  • inner index: 10 bits

So:

  • outer page directory always occupies 1 page
  • each inner page table also occupies 1 page
  • one inner page table can map 1024 pages

For minimum total pages across both levels:

  • cluster the 2000 accessed pages into as few inner tables as possible
  • need ⌈20001024⌉=2\left\lceil \frac{2000}{1024} \right\rceil = 2 inner tables

So

X=1+2=3.X = 1 + 2 = 3.

For maximum total pages across both levels:

  • spread the 2000 pages across as many different inner tables as possible
  • there are only 1024 outer-directory entries, so at most 1024 inner tables can exist

So

Y=1+1024=1025.Y = 1 + 1024 = 1025.

Hence,

X+Y=3+1025=1028.X+Y = 3 + 1025 = 1028.

Therefore, the correct answer is 1028.

Q54 · Algorithms · Numerical · 2 marks

The number of distinct minimum-weight spanning trees of the following graph is _________

Graph for Q59

Answer (official key): 9

Solution

This is a figure-dependent minimum-spanning-tree counting question. The official accepted answer is 9.

A full worked counting argument can be added later if you want the final polished explanation.

Q58 · Discrete Mathematics · MSQ · 2 marks

Let GG be an undirected connected graph in which every edge has a positive integer weight. Suppose that every spanning tree in GG has even weight.

Which of the following statements is/are TRUE for every such graph GG?

  • (A)
    All edges in GG have even weight
  • (B)
    All edges in GG have even weight OR all edges in GG have odd weight
  • (C)
    In each cycle CC in GG, all edges in CC have even weight
  • (D)
    In each cycle CC in GG, either all edges in CC have even weight OR all edges in CC have odd weight

Answer (official key): D

Solution

Take any spanning tree TT of GG. For any non-tree edge ee, adding ee to TT creates a unique cycle. If we remove any tree edge ff on that cycle, we get another spanning tree.

Since every spanning tree has even total weight,

w(T)≡0(mod2)andw(T)−w(f)+w(e)≡0(mod2).w(T) \equiv 0 \pmod 2 \quad\text{and}\quad w(T) - w(f) + w(e) \equiv 0 \pmod 2.

Hence,

w(e)≡w(f)(mod2).w(e) \equiv w(f) \pmod 2.

So, within any cycle, all edges must have the same parity. They may all be even or all be odd. Therefore (D) is true.

The other statements are not forced in general.

Therefore, the correct answer is D.

The other 60 questions are solved in your report when you take GATE 2024 CS (Set 2) as a 3-hour test.

Take GATE 2024 CS (Set 2) as a test

Official answer key

GATE 2024 CS (Set 2) answer key

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

Download the official GATE 2024 CS (Set 2) answer key (PDF)
QTopicTypeMarksAnswer
1Verbal AptitudeMCQ1C
2Quantitative AptitudeMCQ1A
3Quantitative AptitudeMCQ1A
4Quantitative AptitudeMCQ1B
5Quantitative AptitudeMCQ1C
6Verbal AptitudeMCQ2C
7Analytical AptitudeMCQ2A
8Quantitative AptitudeMCQ2C
9Spatial AptitudeMCQ2A
10Quantitative AptitudeMCQ2D
11Programming and Data StructuresMCQ1A
12Discrete MathematicsMCQ1B
13DatabasesMCQ1A
14Discrete MathematicsMCQ1A
15Digital LogicMCQ1B
16Discrete MathematicsMCQ1A
17Probability and StatisticsMCQ1B
18Computer Organization and ArchitectureMCQ1C
19CalculusMCQ1B
20DatabasesMCQ1A
21DatabasesMSQ1A, B
22DatabasesMSQ1A, C, D
23Compiler DesignMSQ1B, D
24Operating SystemMSQ1B, C, D
25Computer NetworksMSQ1B, C
26Compiler DesignMCQ1B
27Digital LogicMSQ1B, C
28Operating SystemMSQ1A, B
29Computer NetworksMSQ1B
30Theory of ComputationMCQ1A
31Computer NetworksMSQ1C, D
32Computer Organization and ArchitectureMSQ1A
33Discrete MathematicsNumerical15
34AlgorithmsNumerical13
35Programming and Data StructuresMSQ1A, B, D
36Programming and Data StructuresMCQ2A
37Computer NetworksMCQ2A
38Operating SystemMCQ2B
39Programming and Data StructuresMCQ2B
40Compiler DesignMCQ2A
41Linear AlgebraMSQ2A, B
42Digital LogicMSQ2A, B, D
43Probability and StatisticsMCQ2D
44Digital LogicMSQ2C, D
45Programming and Data StructuresMSQ2B, C, D
46Theory of ComputationMCQ2B
47Compiler DesignMCQ2A
48AlgorithmsMCQ2B
49DatabasesMCQ2B
50Operating SystemMSQ2B, C
51Computer Organization and ArchitectureNumerical22.9 to 3.1
52Operating SystemNumerical21028
53Computer NetworksNumerical2500
54AlgorithmsNumerical29
55Theory of ComputationNumerical215
56Computer Organization and ArchitectureNot in GATE 2027 syllabus: Secondary storage (magnetic disk)Numerical229.5 to 30.5
57Discrete MathematicsNumerical24
58Discrete MathematicsMSQ2D
59Computer Organization and ArchitectureNumerical232
60Theory of ComputationMSQ2B, C
61DatabasesNumerical250
62Discrete MathematicsNumerical22
63Compiler DesignNumerical29
64Computer Organization and ArchitectureNumerical234
65Computer NetworksNumerical24

Questions about GATE 2024 CS (Set 2)

How many questions are in the GATE 2024 CS (Set 2) 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, 18 MSQs, 15 numerical answer (NAT) questions. The paper lasted 3 hours.

Is there negative marking in GATE 2024 CS (Set 2)?

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 2024 CS (Set 2)?

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

Were any GATE 2024 CS (Set 2) questions awarded marks to all?

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

Where does this GATE 2024 CS (Set 2) answer key come from?

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

More GATE papers