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 PYQ2025Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
​​​​If A=(122−1)A=\left(\begin{array}{cc}1 & 2 \\ 2 & -1\end{array}\right), then which ONE of the following is A8A^{8} ?
Official PYQ2025Engineering MathematicsMaxima and Minima, Mean Value Theorem, IntegrationMCQ · 1 mark
​​​​​The value of xx such that x>1x>1, satisfying the equation ∫1xtln⁡t dt=14\int_1^x t \ln t \: dt = \frac{1}{4} is
Official PYQ2025Programming and Data StructuresTreesMCQ · 1 mark
​​​​Consider a binary tree TT in which every node has either zero or two children. Let n>0n>0 be the number of nodes in TT. Which ONE of the following is the number of nodes in TT that have exactly two children?
Official PYQ2025Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
Let LL, MM, and NN be non-singular matrices of order 33 satisfying the equations L2=L−1L^2 = L^{-1}, M=L8M=L^8 and N=L2N=L^2. Which ONE of the following is the value of the deteminant of (M−N)(M-N)?
Official PYQ2025Engineering MathematicsPropositional and First Order LogicMCQ · 1 mark
​​​Let P(x)P(x) be an arbitrary predicate over the domain of natural numbers. Which ONE of the following statements is TRUE?
Official PYQ2025Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
​​​​​Consider the following statements: Address Resolution Protocol (ARP) provides a mapping from an IP address to the corresponding hardware (link-layer) address. A single TCP segment from a sender SS to a receiver RR cannot carry both data from SS to RR and acknowledgement for a segment from RR to SS Which one of the following is CORRECT?
Official PYQ2025Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
Consider the routing protocols given in List I and the names given in List II: …
Official PYQ2025Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
​​​A machine receives an IPv4IPv4 datagram. The protocol field of the IPv4IPv4 header has the protocol number of a protocol XX. Which ONE of the following is NOT a possible candidate for XX?
Official PYQ2025Programming and Data StructuresProgramming in CMCQ · 1 mark
​​​​​Consider the following C program: #include <stdio.h> void stringcopy (char *, char *); int main() { char a[30] = "@#Hello World!"; stringcopy(a, a+2); printf("%s\n",a); return 0; } void stringcopy(char *s, char *t) { while (*t) *s++=*t++; } Which one of the following will be the output of the program?
Official PYQ2025AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
​​​​Consider an unorders list of NN distinct integers. What is the minimum number of element comaparisons required to find an integer in the list that is NOT the largest in the list?
Official PYQ2025Compiler DesignIntermediate Code GenerationMCQ · 1 mark
​​​​Consider the following statements about the use of backpatching in a compiler for intermediate code generation: Backpatching can be used to generate code for Boolean expression in one pass. Back[atching can be used to generate code for flow-of-control statements in one pass. Which ONE of the folloeing options is CORRECT?
Official PYQ2025Compiler DesignSyntax-directed TranslationMCQ · 1 mark
​​Given the following syntax directed translation rules: Rule 1: R→AB{B.i=R.i−1;A.i=B.i;R.i=A.i+1;}R \rightarrow A B\{B . i=R . i-1 ; A . i=B . i ; R . i=A . i+1 ;\} Rule 2: P→CD{P.i=C.i+D.i;D.i=C.i+2;}P \rightarrow C D\{P . i=C . i+D . i ; D . i=C . i+2 ;\} Rule 3: Q→EF{Q.i=E.i+F.i;}Q \rightarrow E F\{Q . i=E . i+F . i ;\} Which ONE is the CORRECT option among the following?
Official PYQ2025Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
​​​​​Consider a network that uses Ethernet and IPv4IPv4. Assume that IPv4IPv4 headers do not use any options field. Each Ethernet frame can carry a maximum of 15001500 bytes in its data field. A UDP segment is transmitted. The payload (data) in the UDPO segment is 74887488 bytes. Which ONE of the following choices has the CORRECT total number of fragments …
Official PYQ2025Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
​​​​Which ONE of the following languages is accepted by a deteministic pushdown automaton?
Official PYQ2025Theory of ComputationUndecidabilityMCQ · 1 mark
​​​​Let G1,G2G_{1}, G_{2} be Context Free Grammars (CFGs) and RR be a regular expression. For a grammar GG, let L(G)L(G) denote the language generated by GG. Which ONE among the following questions is decidable?
Official PYQ2025Operating SystemCPU SchedulingMCQ · 1 mark
​​​Processes P1,P2,P3,P4P 1, P 2, P 3, P 4 arrive in that order at times 0,1,20,1,2, and 8 milliseconds respectively, and have execution times of 10,13,610,13,6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times. Which ONE of the following correctly gives the average …
Official PYQ2025DatabasesTransactions and Concurrency ControlMSQ · 1 mark
​​​​An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account AA attempted simultaneous transfers of Rs. 1000010000 each from account AA to account BB. Both transactions read the same value, Rs.1100011000, as the initial balance in AA and were allowed to go through. BB was credited Rs.1000010000 …
Official PYQ2025Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
​​​​Which of the following is/are part of an Instruction Set Architecture of a processor?
Official PYQ2025AlgorithmsGraph Traversals (BFS, DFS)MSQ · 1 mark
​​​​Which of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph GG is/are TRUE?
Official PYQ2025Theory of ComputationRegular and Context-free LanguagesMSQ · 1 mark
Consider the two lists List I and List II given below: …