∑GateAndNet
PlannerSign Up
💻GATE CSWeightage: 10–12 Marks4 Study Chapters15 Solved PYQs

Programming & Data Structures

C programming pointers & recursion, stacks, queues, linked lists, trees, AVL, binary heaps & hashing.

Practice Unit PYQs (15)All GATE CS Units
Official Syllabus Micro-Topics
Programming in C: Pointers, Arrays, Strings, Structures, Unions, Storage Classes (auto, static, extern)Recursion, Activation Records, Call Stack & Parameter Passing (Value vs Reference/Pointer)Linear Data Structures: Arrays (Row/Column Major), Stacks (Infix/Postfix), Queues, Circular Queues & Linked ListsTrees: Binary Trees, Traversals (Inorder, Preorder, Postorder), Binary Search Trees (BST)Balanced Trees: AVL Tree Rotations (LL, RR, LR, RL) & Height BoundsBinary Heaps: Min/Max Heap, Build-Heap in O(n), Priority QueuesHashing: Hash Functions, Chaining vs Open Addressing (Linear/Quadratic Probing, Double Hashing)

Published Study Notes & Chapters (4)

Ch 1 High Yield 4 min read 2 PYQs

C Pointers, Static Storage, Array Decay & Tricky Output Patterns

Precedence of * and ++, 2D array pointer arithmetic, static variables in recursion, and string literal traps.

Read Chapter
Ch 2 High Yield 4 min read 6 PYQs

AVL Trees, Binary Heaps & Hashing Probe Complexity

Minimum nodes in AVL tree of height h, O(n) Build-Heap proof, and LL/RR/LR/RL rotation rules.

Read Chapter
Ch 3 4 min read 4 PYQs

Stacks, Queues, Linked Lists & Binary Tree Properties

Infix/Postfix evaluation, Circular Queue full/empty modular arithmetic, Linked List pointer complexities, Binary Tree degree handshaking lemma, and unique tree reconstruction rules.

Read Chapter
Ch 4 High Yield 5 min read 3 PYQs

Advanced C Programming: Pointer Arithmetic, 2D Array Decay, Struct Padding & Bitwise Traps

Clockwise/Spiral C declaration rule, &a vs a+1 pointer scaling, 2D array row pointers, structure alignment padding vs union size, static persistence, and sequence-point undefined behavior.

Read Chapter

Solved Programming & Data Structures PYQs & Practice Questions

Launch Timed Mock (15 Qs)
Q1GATE CS 2025Programming & Data StructuresNATMEDIUM
+2M • 0 Neg

How many times is the printf statement executed when fun(6) is called for void fun(int n) { if (n <= 1) return; fun(n - 1); printf("*"); fun(n - 2); }?

Q2GATE CS C TraceProgramming & Data StructuresNATMEDIUM
+2M • 0 Neg

What integer value is returned by calling f(5) for the C function int f(int n) { static int r = 0; if (n <= 0) return 1; if (n > 3) { r = n; return f(n - 2) + 2; } return f(n - 1) + r; }?

Q3GATE CS 2024 Set-1Programming & Data StructuresMCQEASY
+1M • -0.33

In a Binary Max-Heap containing n=100n = 100 distinct elements stored in a 1-indexed array H[1..100], in which subarray index range MUST the minimum element reside?

⚡ Click an option above to verify instantly
Q4GATE CS 2019Programming & Data StructuresMCQMEDIUM
+2M • -0.67

Keys 12, 18, 13, 2, 3, 23, 5, 15 are inserted in order into an initially empty hash table of size m=10m = 10 using h(k)=k mod 10h(k) = k \bmod 10 and Linear Probing. At which index is key 15 placed?

⚡ Click an option above to verify instantly
Q5GATE CS 2020Programming & Data StructuresNATMEDIUM
+2M • 0 Neg

What is the minimum number of nodes in a height-balanced AVL tree of height h=5h = 5 (where a single root node has height h=0h = 0)?

Q6UGC NET / GATE DSAProgramming & Data StructuresMCQEASY
+1M • -0.33

Which open-addressing collision resolution technique eliminates both primary and secondary clustering?

⚡ Click an option above to verify instantly
Q7GATE CS DSAProgramming & Data StructuresMCQMEDIUM
+2M • -0.67

What is the minimum number of nodes in an height-balanced AVL tree of height h=4h = 4 (where a single root node has height 00)?

⚡ Click an option above to verify instantly
Q8GATE CS DSAProgramming & Data StructuresMCQMEDIUM
+2M • -0.67

What is the tight worst-case time complexity of building a Binary Max-Heap bottom-up (Build-Max-Heap) from an unsorted array of nn elements?

⚡ Click an option above to verify instantly
Solve All 15 Programming & Data Structures Questions
Other Units in GATE Computer Science & Information Technology (GATE CS)
∑ Engineering Mathematics & Discrete Math🔌 Digital Logic🏗️ Computer Organization & Architecture💻 Programming & Data Structures⚡ Algorithms🔄 Theory of Computation🛠️ Compiler Design⚙️ Operating Systems🗄️ Databases (DBMS)🌐 Computer Networks🧭 General Aptitude (Mandatory)