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.

20 on this page
Official PYQ2004AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Two matrices M1M_1 and M2M_2 are to be stored in arrays AA and BB respectively. Each array can be stored either in row-major or column-major order in contiguous memory locations. The time complexity of an algorithm to compute M1×M2M_1 \times M_2 will be
Official PYQ2004Programming and Data StructuresBinary HeapsMCQ · 1 mark
The elements 32,15,20,30,12,25,16,32, 15, 20, 30, 12, 25, 16, are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
Official PYQ2004Programming and Data StructuresLinked ListsMCQ · 1 mark
A circularly linked list is used to represent a Queue. A single variable pp is used to access the Queue. To which node should pp point such that both the operations enQueue\text{enQueue} and deQueue\text{deQueue} can be performed in constant time?
Official PYQ2004Programming and Data StructuresTreesMCQ · 1 mark
Consider the label sequences obtained by the following pairs of traversals on a labeled binary tree. Which of these pairs identify a tree uniquely? preorder and postorder inorder and postorder preorder and inorder level order and postorder
Official PYQ2004Object-Oriented Programming (Historical)MCQ · 1 mark
It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique id, and salary. Employees belong to different categories and their salary is determined by their category. The functions get name, getId and compute salary are required. Given the class hierarchy below, possible locations for these functions are: …
Official PYQ2004Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following C program segment: char p[20]; int i; char* s = "string"; int length = strlen(s); for(i = 0; i < length; i++) p[i] = s[length-i]; printf("%s", p); The output of the program is:
Official PYQ2004Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following program fragment for reversing the digits in a given integer to obtain a new integer. Let n=d1 d2 … dmn = d_1\, d_2\, \ldots\, d_m. int n, rev; rev = 0; while(n > 0) { rev = rev * 10 + n%10; n = n/10; } The loop invariant condition at the end of the ithi^{th} iteration is:
Official PYQ2004Programming and Data StructuresRecursionMCQ · 1 mark
Consider the following C function: int f(int n) { static int i = 1; if(n >= 5) return n; n = n+i; i++; return f(n); } The value returned by f(1)f(1) is:
Official PYQ2004AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
The problem 3-SAT\text{3-SAT} and 2-SAT\text{2-SAT} are
Official PYQ2004AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of
Official PYQ2004Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
What is the result of evaluating the following two expressions using three-digit floating point arithmetic with rounding? (113.+−111.)+7.51(113. + -111.) + 7.51 113.+(−111.+7.51)113. + (-111. + 7.51)
Official PYQ2004Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
Let A,B,C,DA, B, C, D be n×nn \times n matrices, each with non-zero determinant. If ABCD=IABCD = I, then B−1B^{-1} is
Official PYQ2004Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
The number of different n×nn \times n symmetric matrices with each element being either 0 or 1 is: (Note: power(2,X)\text{power} \left(2, X\right) is same as 2X2^X)
Official PYQ2004Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
If a fair coin is tossed four times. What is the probability that two heads and two tails will result?
Official PYQ2004Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Consider the binary relation: S={(x,y)∣y=x+1 and x,y∈{0,1,2}}S= \left\{\left(x, y\right) \mid y=x+1 \text{ and } x, y \in \left\{0, 1, 2\right\} \right\} The reflexive transitive closure is SS is
Official PYQ2004Engineering MathematicsPropositional and First Order LogicMCQ · 1 mark
Identify the correct translation into logical notation of the following assertion. Some boys in the class are taller than all the girls Note: taller(x,y)\text{taller} (x, y) is true if xx is taller than yy.
Official PYQ2004Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
How many 8−bi8-bit characters can be transmitted per second over a 96009600 baud serial communication link using asynchronous mode of transmission with one start bit, eight data bits, two stop bits and one parity bit?
Official PYQ2004Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
Official PYQ2004Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Which of the following addressing modes are suitable for program relocation at run time? Absolute addressing Based addressing Relative addressing Indirect addressing
Official PYQ2004Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
If 73x73_x (in base-x number system) is equal to 54y54_y (in base yy-number system), the possible values of xx and yy are