Gradient LabSign up free

Home / GATE DA / Programming

GATE DA Programming PYQs with solutions

Every programming question from the GATE DA papers of 2026, 2025, 2024: 10 questions worth 18 marks. This covers Python tracing: recursion, lists, dicts and mutable defaults. 8 are solved free; the rest are in the past-paper pack (₹499).

2026: 4 questions (7 marks) · 2025: 3 questions (5 marks) · 2024: 3 questions (6 marks)

GATE DA 2026

Q.16Python default list shared across calls
Mutable default arguments · 1 mark · MCQ
Free
Q.39Stack activations for mystery(4)
Recursion call count · 2 marks · MCQ
Free
Q.50Each outer() call makes its own list
Python closures · 2 marks · MSQ (more than one correct)
Free
Q.58Total swaps counted by a recursive bubble pass
Recursive bubble pass · 2 marks · Numerical answer
Free

GATE DA 2025

Q.23Concatenate in place
Python lists · 1 mark · MCQ
Free
Q.47Which sets contain "this" at the end
Python sets in a loop · 2 marks · MCQ
Q.63Output of a recursive doubling function
Recursion in Python · 2 marks · Numerical answer
Free

GATE DA 2024

Q.38Output of a recursive count over a dict tree
Recursion in Python · 2 marks · MCQ
Free
Q.39Output of computeS on [6, 3, 5, 4, 10]
Array pseudocode trace · 2 marks · MCQ
Free
Q.41What a recursive swap function does
Recursion in Python · 2 marks · MCQ

Other subjects

General Aptitude · Machine learning · Artificial intelligence · Data structures and algorithms · Databases · Probability and statistics · Linear algebra · Calculus and optimization