Skip to content

GATE CS question library

Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

3 on this page
Official PYQ2013Programming and Data StructuresProgramming in CNAT · 1 mark
What is the return value of f(p,p)f(p,p), if the value of pp is initialized to 55 before the call? Note that the first parameter is passed by reference, whereas the second parameter is passed by value. int f (int &x, int c) { c = c - 1; if (c==0) return 1; x = x + 1; return f(x,c) * x; }
Official PYQ2013Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
Consider the following operation along with Enqueue and Dequeue operations on queues, where kk is a global parameter. MultiDequeue(Q){ m = k while (Q is not empty) and (m > 0) { Dequeue(Q) m = m – 1 } } What is the worst case time complexity of a sequence of nn queue operations on an initially empty queue?
Official PYQ2013Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
A binary operation ⊕\oplus on a set of integers is defined as x⊕y=x2+y2x \oplus y = x^{2}+y^{2}. Which one of the following statements is TRUE about ⊕\oplus?