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 PYQ2026DatabasesNormal FormsMSQ · 1 mark
Let P,Q,RP, Q, R and SS be the attributes of a relation in a relational schema. Let X→YX \rightarrow Y indicate functional dependency in the context of a relational database, where X,Y⊆{P,Q,R,S}X, Y \subseteq\{P, Q, R, S\}. Which of the following options is/are always true?
Official PYQ2026DatabasesNormal FormsMSQ · 1 mark
In the context of relational database normalization, which of the following statements is/are true?
Official PYQ2026Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityNAT · 1 mark
Consider the function f:R→Rf: \mathbb{R} \rightarrow \mathbb{R} defined as follows: f(x)={c1ex−c2log⁡e(1x), if x>03 otherwise f(x)=\left\{\begin{array}{lr} c_{1} e^{x}-c_{2} \log _{\mathrm{e}}\left(\frac{1}{x}\right), & \text{ if } x>0 \\ 3 & \text{ otherwise } \end{array}\right. where c1,c2∈Rc_{1}, c_{2} \in \mathbb{R}. If ff is continuous at x=0x=0, then c1+c2=c_{1}+c_{2}= …
Official PYQ2026AlgorithmsSearching, Sorting, HashingNAT · 1 mark
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with 2323 nodes is ____\_\_\_\_.(answer in integer)
Official PYQ2026Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following program in C: #include <stdio.h> void func(int i, int j) { if(i < j) { int i = 0; while (i < 10) { j += 2; i++; } } printf("%d", i); } int main() { int i = 9, j = 10; func(i, j); return 0; } The output of the program is ______\_\_\_\_\_\_. (answer in integer) Note: Assume that the program compiles and runs successfully.
Official PYQ2026Operating SystemDeadlockNAT · 1 mark
Consider a system consisting of kk instances of a resource RR, being shared by 55 processes. Assume that each process requires a maximum of two instances of resource RR and a process can request or release only one instance at a time. Further, a process can request the second instance of the resource only after acquiring the first instance. The …
Official PYQ2026Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 2 marks
Consider the real valued variables X,YX, Y and ZZ represented using the IEEE 754754 singleprecision floating-point format. The binary representations of XX and YY in hexadecimal notation are as follows: X:35C00000Y:34A00000X: 35 \mathrm{C} 00000 \quad Y: 34 \mathrm{A} 00000 Let Z=X+YZ=X+Y. Which one of the following is the binary representation of ZZ, in …
Official PYQ2026Digital LogicSequential CircuitsMCQ · 2 marks
Consider a 22-bit saturating up/down counter that performs the saturating up count when the input PP is 00, and the saturating down count when PP is 11. The Next State table of the counter is as shown. The counter is built as a synchronous sequential circuit using D flip-flops. InputCureent StateNext State …
Official PYQ2026Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 2 marks
The size of the physical address space of a processor is 2322^{32} bytes. The capacity of a cache memory unit is 2232^{23} bytes. The cache block size is 128128 bytes. The cache memory unit can be built as a direct mapped cache or as a KK-way set-associative cache, where K=2LK=2^{L} and L∈{1,2,3}L \in\{1,2,3\}. Let the length of the TAG field be MM bits …
Official PYQ2026Programming and Data StructuresLinked ListsMCQ · 2 marks
Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer variable head. struct node{ int elt; struct node *next; }; int getListSize (struct node *head) { if( E1 ) return 1; return E2; } Which one of the following options gives the correct replacements for the expressions …
Official PYQ2026AlgorithmsSearching, Sorting, HashingMCQ · 2 marks
Let PP be the set of all integers from 11 to 1515. Consider any order of insertion of the elements of PP into a binary search tree that creates a complete binary tree. Which one of the following elements can NEVER be the third element that is inserted?
Official PYQ2026AlgorithmsGraph Traversals (BFS, DFS)MCQ · 2 marks
Let G(V,E)G(V, E) be an undirected, edge-weighted graph with integer weights. The weight of a path is the sum of the weights of the edges in that path. The length of a path is the number of edges in that path. Let s∈Vs \in V be a vertex in GG. For every u∈Vu \in V and for every k≥0k \geq 0, let dk(u)d_{k}(u) denote the weight of a shortest path (in terms …
Official PYQ2026Compiler DesignParsing (LL, LR)MCQ · 2 marks
Consider the control flow graph shown in the figure. Which one of the following options correctly lists the set of redundant expressions (common subexpressions) in the basic blocks B44 and B55? Note: All the variables are integers.
Official PYQ2026DatabasesTuple Calculus and SQLMCQ · 2 marks
Consider a relational database schema with two relations R(P,Q)R(P, Q) and S(X,Y)S(X, Y). Let E={⟨u⟩∣∃v∃w⟨u,v⟩∈R∧⟨v,w⟩∈S}E=\{\langle u\rangle \mid \exists v \exists w\langle u, v\rangle \in R \wedge\langle v, w\rangle \in S\} be a tuple relational calculus expression. Which one of the following relational algebraic expressions is equivalent to EE ?
Official PYQ2026Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 2 marks
A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism's slow-start threshold is set to 1000010000 segments. Assume that the round-trip time is fixed at 11 millisecond. Assume that the sender always has data to send, the segments are numbered from 11, and no …
Official PYQ2026Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 2 marks
Consider the implementation of sliding window protocol over a lossless link, with a window size of WW frames, where each frame is of size 10001000 bits (including header). The bandwidth of the link is 100kbps(1k=103)100 \mathrm{kbps}\left(1 \mathrm{k}=10^{3}\right) and the one-way propagation delay is 100100 milliseconds. Assume that processing times at the sender …
Official PYQ2026Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityMSQ · 2 marks
Let f:R→Rf: \mathbb{R} \rightarrow \mathbb{R} be defined as follows: f(x)=(∣x∣2−x)(x−∣x∣2)f(x)=\left(\frac{|x|}{2}-x\right)\left(x-\frac{|x|}{2}\right) Which of the following statements is/are true?
Official PYQ2026Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 2 marks
Let G(V,E)G(V, E) be a simple, undirected graph. A vertex cover of GG is a subset V′⊆VV^{\prime} \subseteq V such that for every (u,v)∈E,u∈V′(u, v) \in E, u \in V^{\prime} or v∈V′v \in V^{\prime}. Let the size of the smallest vertex cover in GG be kk. Let SS be any vertex cover of size kk. For a vertex v∈Vv \in V, which of the following constraints …
Official PYQ2026Digital LogicMinimization (K-Maps etc.)MSQ · 2 marks
Consider a Boolean function FF with the following minterm expression: F(P,Q,R,S)=∑m(1,2,3,4,5,7,10,12,13,14)F(P, Q, R, S)=\sum m(1,2,3,4,5,7,10,12,13,14) Which of the following options is/are the minimal sum-of-products expression(s) of FF ?
Official PYQ2026AlgorithmsMinimum Spanning TreesMSQ · 2 marks
Let G(V,E)G(V, E) be a simple, undirected, edge-weighted graph with unique edge weights. Which of the following statements about the minimum spanning trees (MST) of GG is/are true?