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 MathematicsEigenvalues and Eigenvectors, LU DecompositionMCQ · 2 marks
Let AA be a 2×22 \times 2 matrix as given. A=[111−1]A=\left[\begin{array}{rr} 1 & 1 \\ 1 & -1 \end{array}\right] What are the eigenvalues of the matrix A13A^{13} ?
Official PYQ2025Digital LogicMinimization (K-Maps etc.)MCQ · 2 marks
Consider the following four variable Boolean function in sum-of-product form F(b3,b2,b1,b0)=∑(0,2,4,8,10,11,12)F\left(b_{3}, b_{2}, b_{1}, b_{0}\right)=\sum(0,2,4,8,10,11,12) where the value of the function is computed by considering b3b2b1b0b_{3} b_{2} b_{1} b_{0} as a 44-bit binary number, where b3b_{3} denotes the most significant bit and b0b_{0} denotes the least significant bit. …
Official PYQ2025AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 2 marks
Let G(V,E)G(V, E) be an undirected and unweighted graph with 100100 vertices. Let d(u,v)d(u, v) denote the number of edges in a shortest path between vertices uu and vv in VV. Let the maximum value of d(u,v),u,v∈Vd(u, v), u, v \in V such that u≠vu \neq v, be 3030. Let TT be any breadth-first-search tree of GG. Which ONE of the given options is CORRECT …
Official PYQ2025Theory of ComputationRegular and Context-free LanguagesMCQ · 2 marks
Consider the following two languages over the alphabet {a,b}\{a, b\}: L1={αβα∣α∈{a,b}+AND β∈{a,b}+}L2={αβα∣α∈{a}+AND β∈{a,b}+}\begin{array}{l} L_{1}=\left\{\alpha \beta \alpha \mid \alpha \in\{a, b\}^{+} \text{AND } \beta \in\{a, b\}^{+}\right\} \\ L_{2}=\left\{\alpha \beta \alpha \mid \alpha \in\{a\}^{+} \text{AND } \beta \in\{a, b\}^{+}\right\} \end{array} Which ONE of the following statements is CORRECT?
Official PYQ2025Theory of ComputationRegular and Context-free LanguagesMCQ · 2 marks
Consider the following two languages over the alphabet {a,b,c}\{a, b, c\}, where mm and nn are natural numbers. L1={ambmcm+n∣m,n≥1}L2={ambncm+n∣m,n≥1}\begin{aligned} L_{1} & =\left\{a^{m} b^{m} c^{m+n} \mid m, n \geq 1\right\} \\ L_{2} & =\left\{a^{m} b^{n} c^{m+n} \mid m, n \geq 1\right\} \end{aligned} Which ONE of the following statements is CORRECT?
Official PYQ2025Compiler DesignParsing (LL, LR)MSQ · 2 marks
Which of the following statement(s) is/are TRUE while computing First⁡\operatorname{First} and Follow⁡\operatorname{Follow} during top down parsing by a compiler?
Official PYQ2025Engineering MathematicsPropositional and First Order LogicMSQ · 2 marks
Which of the following predicate logic formulae/formula is/are CORRECT representation(s) of the statement: "Everyone has exactly one mother"? The meanings of the predicates used are: mother (y,x):y(y, x): y is the mother of xx noteq (x,y):x(x, y): x and yy are not equal
Official PYQ2025DatabasesNormal FormsMSQ · 2 marks
Consider a relational schema team (name,city,owner)\text{(name,city,owner)}, with functional dependencies {name→city,name→owner}\{\text{name} \rightarrow \text{city}, \text{name} \rightarrow \text{owner} \}. The relation team is decomposed into two relations, t1(name,city)\text{t1(name,city)} and t2(name, owner)\text{t2(name, owner)}. Which of the following statement(s) is/are TRUE?
Official PYQ2025Engineering MathematicsSets, Relations and FunctionsMCQ · 2 marks
A={0,1,2,3,…}A=\{0,1,2,3, \ldots\} is the set of non-negative integers. Let FF be the set of functions from AA to itself. For any two functions, f1,f2∈ Ff_{1}, f_{2} \in \mathrm{~F}, we define (f1⊙f2)(n)=f1(n)+f2(n)\left(f_{1} \odot f_{2}\right)(n)=f_{1}(n)+f_{2}(n) for every number nn in AA. Which of the following is/are CORRECT about the mathematical structure …
Official PYQ2025Operating SystemFile SystemsNAT · 2 marks
A disk of size 512 M512 \text{ M} bytes is divided into blocks of 64 K64 \text{ K} bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 44 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 44 bytes). Suppose a file of …
Official PYQ2025Theory of ComputationRegular Expressions and Finite AutomataMCQ · 2 marks
Consider the following deterministic finite automaton (DFA) defined over the alphabet, Σ={a,b}\Sigma=\{a, b\}. Identify which of the following language(s) is/are accepted by the given DFA.
Official PYQ2025Compiler DesignIntermediate Code GenerationNAT · 2 marks
Refer to the given 33-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is ________. (Answer in integer) 1001: i = 1 1002: j = 1 1003: t1 = 10*i 1004: t2 = t1+j 1005: t3 = 8*t2 1006: t4 = t3-88 1007: a[t4] = 0.0 1008: j = j+1 1009: if j <= 10 goto 1003 1010: i = i+1 1011: if i <= 10 goto 1002 1012: i = …
Official PYQ2025Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 2 marks
A computer has a memory hierarchy consisting of two-level cache (L1\text{(L1} and L2)\text{L2)} and a main memory. If the processor needs to access data from memory, it first looks into L1\text{L1} cache. If the data is not found in L1\text{L1} cache, it goes to L2\text{L2} cache. If it fails to get the data from L2\text{L2} cache, it goes to main …
Official PYQ2025Operating SystemMemory Management and Virtual MemoryNAT · 2 marks
In optimal page replacement algorithm, information about all future page references is available to the operating system (OS). A modification of the optimal page replacement algorithm is as follows: The OS correctly predicts only up to next 44 page references (including the current page) at the time of allocating a frame to a page. A process accesses the …
Official PYQ2025DatabasesTuple Calculus and SQLNAT · 2 marks
Consider the following database tables of a sports league. player (pid, pname, age) team(tid, tname, city, cid) coach (cid, cname) members (pid,tid) An instance of the table and an SQL query are given. …
Official PYQ2025Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingNAT · 2 marks
Suppose a 55-bit message is transmitted from a source to a destination through a noisy channel. The probability that a bit of the message gets flipped during transmission is 0.010.01. Flipping of each bit is independent of one another. The probability that the message is delivered error-free to the destination is ___________ (rounded off to three decimal …
Official PYQ2025Computer NetworksFragmentation and IP Addressing, IPv4, CIDRNAT · 2 marks
Suppose a message of size 1500015000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is _________. (Answer in integer)
Official PYQ2025Engineering MathematicsProbability: Random Variables and DistributionsNAT · 2 marks
Consider a probability distribution given by the density function P(x)P(x). P(x)={Cx2, for 1≤x≤40, for x<1 or x>4P(x)=\left\{\begin{aligned} C x^{2}, & \text{ for } 1 \leq x \leq 4 \\ 0, & \text{ for } x<1 \text{ or } x>4 \end{aligned}\right. The probability that xx lies between 22 and 33, i.e., P(2≤x≤3)P(2 \leq x \leq 3) is _________. (rounded off to three decimal …
Official PYQ2025Theory of ComputationRegular Expressions and Finite AutomataNAT · 2 marks
Consider a finite state machine (FSM) with one input XX and one output ff, represented by the given state transition table. The minimum number of states required to realize this FSM is _______. (Answer in integer). …
Official PYQ2025Digital LogicSequential CircuitsNAT · 2 marks
Consider the given sequential circuit designed using D-Flip-flops. The circuit is initialized with some value (initial state). The number of distinct states the circuit will go through before returning back to the initial state is ___________. (Answer in integer)