GATE CSE · Previous year papers · 2024

GATE CSE 2024 previous year paper · official paper and PYQ-pattern practice

12 PYQ-pattern questions modelled on the 2024 paper (which had 65) · 180 min

Every question here is freshly worded in the pattern of the 2024 paper — same topics, style and difficulty — not the original questions, which Shishya does not reproduce.

The original 2024 paper, as GATE 2024 (organised by IISc Bengaluru); file on the GATE 2026 site's previous-years page published it

Full-length mock in the real pattern — 65 questions, 180 minutes →

Shishya's own practice questions, set out subject by subject like the real paper — not the original paper.

Share with your prep group:WhatsApp

Solve these 12 2024-pattern questions as a timed mock — free

12 PYQ-pattern questions modelled on the 2024 paper (which had 65) · instant scoring · topic-wise analysis. Sign up with Google, free, to attempt and track your progress.

Sign up with GoogleNo forms. Take this set timed and keep your score.Sign up to take this 2024-pattern set against the clock. Your score is kept, and you can review every question with its solution and retake the set later. Shishya wrote these questions on the GATE CSE pattern. GATE CSE is set up as your exam. Free, with your Google account, no forms.Practise 10 questions from this set — the first 2 free →

Stuck on a question from this set?

Ask Shishya — your free AI tutor — to explain any GATE CSE 2024-pattern question, concept, or shortcut, step by step, in your language.

Ask Shishya about this set →

GATE CSE 2024 PYQ-pattern questions

Showing 10 of the 12 PYQ-pattern questions in this set — freshly worded in that year's pattern, not the original questions. Answers and solutions open under each question.

  1. Q1 · Theory of Computation

    Let L be a regular language over the alphabet {0, 1}. Which of the following languages is guaranteed to be regular?

    • A. L² = {xy | x ∈ L and y ∈ L}
    • B. {ww | w ∈ L}
    • C. {w | w has equal number of 0s and 1s and w ∈ L}
    • D. {0ⁿ1ⁿ | n ≥ 0 and 0ⁿ ∈ L}
    Answer and solution

    Answer: A

    Regular languages are closed under concatenation. L² is the concatenation of L with itself, hence it is regular. Options B, C, and D are not guaranteed to produce regular languages.

  2. Q2 · Operating System

    Three processes P1, P2, and P3 require resources R1, R2, and R3. The allocation matrix is [[1,0,1], [1,1,0], [0,0,1]] and the maximum need matrix is [[2,1,2], [3,2,1], [1,1,2]]. Available resources are [1,1,0]. Which of the following sequences is a safe sequence?

    • A. P1, P2, P3
    • B. P3, P1, P2
    • C. P2, P3, P1
    • D. No safe sequence exists
    Answer and solution

    Answer: D

    Need = Max - Allocation: P1[1,1,1], P2[2,1,1], P3[1,1,1]. Available=[1,1,0]. Each process needs 1 unit of R3, but R3 available is 0, and no process can complete to release R3 (P1 and P3 hold 1 R3 each but can't finish without acquiring R3). Thus none can proceed; no safe sequence exists.

  3. Q3 · Databases

    Consider a relation Student(ID, Name, Dept) with 500 tuples and Department(Dept, Building) with 20 tuples. If a natural join is performed on Dept attribute and every student belongs to exactly one department that exists in Department relation, what is the minimum possible number of tuples in the result?

    • A. 20
    • B. 100
    • C. 500
    • D. 10000
    Answer and solution

    Answer: C

    Since every student belongs to exactly one department that exists in the Department relation, the natural join will preserve all 500 student tuples. Each student tuple will be joined with exactly one matching department tuple, resulting in exactly 500 tuples in the output.

  4. Q4 · Digital Logic

    A combinational circuit is designed using four 2-to-1 multiplexers. What is the maximum number of input variables (excluding control/select inputs of the multiplexers) that such a circuit can have?

    • A. 4
    • B. 6
    • C. 8
    • D. 12
    Answer and solution

    Answer: C

    Each 2-to-1 multiplexer has 2 data inputs and 1 select input. Four such multiplexers can have at most 4×2 = 8 distinct input variables.

  5. Q5 · Compiler Design

    In a compiler, which phase is responsible for eliminating common sub-expressions from the intermediate code?

    • A. Lexical Analysis
    • B. Syntax Analysis
    • C. Code Optimization
    • D. Code Generation
    Answer and solution

    Answer: C

    Code Optimization phase eliminates redundant computations including common sub-expressions to improve efficiency of generated code.

  6. Q6 · Computer Networks

    In a Go-Back-N ARQ protocol with a window size of 7, if frame 4 is lost during transmission, which frames will the sender retransmit after detecting the loss?

    • A. Only frame 4
    • B. Frames 4, 5, 6, 7
    • C. Frames 4 through 10
    • D. All frames from 4 onward sent so far
    Answer and solution

    Answer: D

    In Go-Back-N, when a frame is lost, the sender retransmits that frame and all subsequent frames that were sent within the window, ensuring sequential delivery.

  7. Q7 · Programming and Data Structures

    What is the output of the following C code snippet? int arr[5] = {10, 20, 30, 40, 50}; int *ptr = arr + 2; printf("%d", *(ptr + 1));

    • A. 20
    • B. 30
    • C. 40
    • D. 50
    Answer and solution

    Answer: C

    ptr points to arr[2] (which is 30). *(ptr+1) accesses the element one position ahead, which is arr[3] = 40.

  8. Q8 · Databases

    Consider a relation R(A, B, C, D) with functional dependencies: {A → B, B → C, C → D}. What is the highest normal form that R satisfies?

    • A. 1NF
    • B. 2NF
    • C. 3NF
    • D. BCNF
    Answer and solution

    Answer: B

    The only candidate key is A (since A→B→C→D determines all). All determinants (A, B, C) are not superkeys except A, so BCNF fails (B→C and C→D violate BCNF). For 3NF: transitive dependencies B→C and C→D have non-prime attributes on RHS (C, D are non-prime), violating 3NF. However, 2NF is satisfied because there are no partial dependencies (key A is single attribute, so no partial dependency possible). Thus highest normal form is 2NF.

  9. Q9 · Quantitative Aptitude

    A shopkeeper marks an article 40% above its cost price. He then offers a discount of 25% on the marked price. If the cost price is ₹500, what is the percentage profit or loss?

    • A. 5% profit
    • B. 5% loss
    • C. 10% profit
    • D. 15% profit
    Answer and solution

    Answer: A

    Marked price = 500 + 40% of 500 = ₹700. Selling price after 25% discount = 700 - 25% of 700 = ₹525. Profit = 525 - 500 = ₹25, which is 5% of cost price.

  10. Q10 · Computer Organization and Architecture

    A CPU has a 5-stage pipeline with stages: Fetch (F), Decode (D), Execute (E), Memory (M), and Write-back (W). Each stage takes 2 ns. If there are no hazards and 100 instructions are executed, what is the total execution time in nanoseconds?

    • A. 200
    • B. 208
    • C. 210
    • D. 1000
    Answer and solution

    Answer: B

    For a 5-stage pipeline, the first instruction takes 5×2 = 10 ns. Each subsequent instruction takes 2 ns. Total = 10 + (99×2) = 208 ns.

Breakdown by subject

  • Computer Science and Information Technology

    10 questions

  • General Aptitude

    2 questions

GATE CSE 2024 previous year paper — frequently asked questions

Where can I solve the GATE CSE 2024 previous year paper (PYQ) free online?
At https://shishya.in/exams/GATE_CSE/pyq/2024 you can solve GATE CSE 12 PYQ-pattern questions modelled on the 2024 paper free. Shishya does not reproduce the original paper: every question is freshly worded in that year's pattern — same topics, style and difficulty, new wording and numbers, and this set holds 12 questions, not the whole paper. They run as a timed mock with instant scoring, step-by-step solutions and topic-wise weak-area analysis. No fee and no coaching enrolment needed. The original 2024 paper is published by GATE 2024 (organised by IISc Bengaluru); file on the GATE 2026 site's previous-years page: https://gate2026.iitg.ac.in/doc/download/2024/CS124S5.pdf
Are these the actual GATE CSE 2024 paper questions?
No. They are PYQ-pattern questions modelled on the GATE CSE 2024 paper — freshly worded practice questions in the same pattern, not the original questions, which Shishya does not reproduce. This set holds 12 questions. The original 2024 paper is published by GATE 2024 (organised by IISc Bengaluru); file on the GATE 2026 site's previous-years page: https://gate2026.iitg.ac.in/doc/download/2024/CS124S5.pdf For a whole paper in one sitting, Shishya has a free full-length mock in the real pattern (65 questions, 180 minutes): the "Full-Length Mock (Real Pattern)" tile at https://shishya.in/exams/GATE_CSE
Do these GATE CSE 2024 pattern questions come with solutions and analysis?
Yes — every question carries a worked solution, and on submitting you get an instant score with a topic-wise breakdown showing exactly which areas to revise. Wrong answers are auto-collected into a free Mistake Notebook for one-tap re-practice until cleared.
Are previous year papers enough to crack GATE CSE?
Previous-year papers are the best signal of what the exam actually tests, but they work best with targeted practice and a plan. On Shishya (all free): solve PYQ-pattern sets year-wise, drill weak topics via the Mistake Notebook, follow a day-by-day plan from the Personal Coach at https://shishya.in/coach and sit the Sunday live test at https://shishya.in/live-test to see where you stand nationally.