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 PYQ2024Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 2 marks
​​​​​Which one of the following CIDR\text{CIDR} prefixes exactly represents the range of IP\text{IP} addresses 10.12.2.010.12 .2 .0 to 10.12.3.25510.12 .3 .255?
Official PYQ2024Programming and Data StructuresBinary Search TreesMCQ · 2 marks
​​​​​​You are given a set VV of distinct integers. A binary search tree TT is created by inserting all elements of VV one by one, starting with an empty tree. The tree TT follows the convention that, at each node, all values stored in the left subtree of the node are smaller than the value stored at the node. You are not aware of the sequence in …
Official PYQ2024Theory of ComputationRegular Expressions and Finite AutomataMCQ · 2 marks
​​Let M\text{M} be the 55-state NFA\text{NFA} with ϵ\epsilon-transitions shown in the diagram below. Which one of the following regular expressions represents the language accepted by M\text{M}?
Official PYQ2024AlgorithmsAlgorithm Design: Greedy TechniquesMCQ · 2 marks
​​​​Consider an array X\mathrm{X} that contains n\mathrm{n} positive integers. A subarray of X\mathrm{X} is defined to be a sequence of array locations with consecutive indices. The C\mathrm{C} code snippet given below has been written to compute the length of the longest subarray of X\mathrm{X} that contains at most two distinct integers. The …
Official PYQ2024Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 2 marks
Let xx and yy be random variables, not necessarily independent, that take real values in the interval [0,1][0,1]. Let z=xyz=x y and let the mean values of x,y,zx, y, z be xˉ,yˉ,zˉ\bar{x}, \bar{y}, \bar{z}, respectively. Which one of the following statements is TRUE?
Official PYQ2024DatabasesRelational Model: Relational AlgebraMCQ · 2 marks
​​​​​The relation schema, Person (pid, city), describes the city of residence for every person uniquely identified by pid. The following relational algebra operators are available: selection, projection, cross product, and rename. To find the list of cities where at least 33 persons reside, using the above operators, the minimum number of cross product …
Official PYQ2024Operating SystemConcurrency and SynchronizationMSQ · 2 marks
​​​​​Consider a multi-threaded program with two threads T1\mathrm{T} 1 and T2\mathrm{T} 2. The threads share two semaphores: s1s1 (initialized to 11) and s2s2 (initialized to 00). The threads also share a global variable x\mathrm{x} (initialized to 00). The threads execute the code shown below. //code of T 1 wait (s1); x = x+1; print (x); …
Official PYQ2024Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMSQ · 2 marks
​​​​​Let AA be an n×nn \times n matrix over the set of all real numbers R\mathbb{R}. Let BB be a matrix obtained from AA by swapping two rows. Which of the following statements is/are TRUE?
Official PYQ2024Programming and Data StructuresArrays, Stacks and QueuesMSQ · 2 marks
​​​​​Let S1\mathrm{S} 1 and S2\mathrm{S} 2 be two stacks. S1\mathrm{S} 1 has capacity of 44 elements. S2\mathrm{S} 2 has capacity of 22 elements. S1\text{S1} already has 44 elements: 100,200,300100,200,300, and 400400, whereas S2\text{S2} is empty, as shown below. …
Official PYQ2024Digital LogicNumber Representations (Fixed and Floating Point)MSQ · 2 marks
Which of the following is/are EQUAL to 224224 in radix - 55 (i.e., base - 55) notation?
Official PYQ2024Digital LogicMinimization (K-Maps etc.)MSQ · 2 marks
Consider 44-variable functions f1,f2,f3,f4f 1, f 2, f 3, f 4 expressed in sum-of-minterms form as given below. f1=∑(0,2,3,5,7,8,11,13)f2=∑(1,3,5,7,11,13,15)f3=∑(0,1,4,11)f4=∑(0,2,6,13)\begin{array}{l} f 1=\sum(0,2,3,5,7,8,11,13) \\ f 2=\sum(1,3,5,7,11,13,15) \\ f 3=\sum(0,1,4,11) \\ f 4=\sum(0,2,6,13) \end{array} With respect to the circuit given above, which of the following options is/are CORRECT?
Official PYQ2024Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 2 marks
Let G\text{G} be an undirected connected graph in which every edge has a positive integer weight. Suppose that every spanning tree in G\text{G} has even weight. Which of the following statements is/are TRUE for every such graph G\text{G}?
Official PYQ2024Compiler DesignParsing (LL, LR)MSQ · 2 marks
​​​​Consider a context-free grammar G\text{G} with the following 33 rules. S→aS,S→aSbS,S→cS \rightarrow a S, S \rightarrow a S b S , S \rightarrow c Let w∈L(G)w \in L(G). Let na(w),nb(w),nc(w)n_{a}(w), n_{b}(w), n_{c}(w) denote the number of times a,b,ca, b, c occur in ww, respectively. Which of the following statements is/are TRUE?
Official PYQ2024Operating SystemI/O SchedulingNAT · 2 marks
Consider a disk with the following specifications: rotation speed of 60006000 RPM, average seek time of 55 milliseconds, 500500 sectors/track, 512512-byte sectors. A file has content stored in 30003000 sectors located randomly on the disk. Assuming average rotational latency, the total time (in seconds, rounded off to 22 decimal places) to read the …
Official PYQ2024Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsNAT · 2 marks
Consider a TCP\text{TCP} connection operating at a point of time with the congestion window of size 1212 MSS\text{MSS} (Maximum Segment Size), when a timeout occurs due to packet loss. Assuming that all the segments transmitted in the next two RTTs\text{RTTs} (Round Trip Time) are acknowledged correctly, the congestion window size (in MSSMSS) during the …
Official PYQ2024Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingNAT · 2 marks
Consider an Ethernet segment with a transmission speed of 108bits/sec10^{8} \mathrm{bits} / \mathrm{sec} and a maximum segment length of 500500 meters. If the speed of propagation of the signal in the medium is 2×108 meters/sec2 \times 10^{8} \mathrm{~meters} / \mathrm{sec}, then the minimum frame size (in bits) required for collision detection is ___________.
Official PYQ2024DatabasesNormal FormsNAT · 2 marks
A functional dependency F:X→YF: X \rightarrow Y is termed as a useful functional dependency if and only if it satisfies all the following three conditions: X\text{X} is not the empty set. Y\text{Y} is not the empty set. Intersection of X\text{X} and Y\text{Y} is the empty set. For a relation R\text{R} with 44 attributes, the total number of …
Official PYQ2024Computer Organization and ArchitectureMachine Instructions and Addressing ModesNAT · 2 marks
A processor with 1616 general purpose registers uses a 3232-bit instruction format. The instruction format consists of an opcode field, an addressing mode field, two register operand fields, and a 1616-bit scalar field. If 88 addressing modes are to be supported, the maximum number of unique opcodes possible for every addressing mode is ___________.
Official PYQ2024Computer Organization and ArchitectureInstruction PipeliningNAT · 2 marks
A non-pipelined instruction execution unit operating at 2GHz2 \mathrm{GHz} takes an average of 66 cycles to execute an instruction of a program P\text{P}. The unit is then redesigned to operate on a 55 -stage pipeline at 2GHz2 \mathrm{GHz}. Assume that the ideal throughput of the pipelined unit is 11 instruction per cycle. In the execution of …
Official PYQ2024AlgorithmsMinimum Spanning TreesNAT · 2 marks
The number of distinct minimum-weight spanning trees of the following graph is