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 PYQ2025Digital LogicCombinational CircuitsMSQ · 1 mark
​Consider the following logic circuit diagram. Which is/are the CORRECT option(s) for the output function FF ?
Official PYQ2025Digital LogicComputer ArithmeticNAT · 1 mark
The following two signed 22 's complement numbers (multiplicand M and multiplier Q) are being multiplied using Booth's algorithm: M: 11001101111011011100110111101101 and Q: 10100100101010101010010010101010 The total number of addition and subtraction operations to be performed is_____________. (Answer in integer)
Official PYQ2025Programming and Data StructuresProgramming in CNAT · 1 mark
int x=126,y=105; do { if(x>y) x=x-y; else y=y-x; } while(x!=y); printf("%d",x); The output of the given C code segment is _________. (Answer in integer)
Official PYQ2025Digital LogicSequential CircuitsNAT · 1 mark
In a 44-bit ripple counter, if the period of the waveform at the last flip-flop is 6464 microseconds, then the frequency of the ripple counter in kHz is _________. (Answer in integer)
Official PYQ2025Programming and Data StructuresBinary Search TreesNAT · 1 mark
Suppose the values 10,−4,15,30,20,5,60,1910,-4,15,30,20,5,60,19 are inserted in that order into an initially empty binary search tree. Let TT be the resulting binary search tree. The number of edges in the path from the node containing 1919 to the root node of TT is _________. (Answer in integer)
Official PYQ2025Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 2 marks
​​​​Suppose we are transmitting frames between two nodes using Stop-and-Wait protocol. The frame size is 30003000 bits. The transmission rate of the channel is 20002000 bps (bits/second) and the propagation delay between the two nodes is 100100 milliseconds. Assume that the processing times at the source and destination are negligible. Also, assume that the …
Official PYQ2025AlgorithmsMinimum Spanning TreesMCQ · 2 marks
​​​​Let G\text{G} be an edge-weighted undirected graph with positive edge weights. Suppose a positive constant α\alpha is added to the weight of every edge. Which ONE of the following statements is TRUE about the minimum spanning trees (MSTs) and shortest paths (SPs) in G\text{G} before and after the edge weight update?
Official PYQ2025Programming and Data StructuresArrays, Stacks and QueuesMCQ · 2 marks
​A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures: P. Unsorted doubly linked list with pointers to the head node and tail node of the list. Q. Min-heap implemented using an array. R. Binary Search Tree. Which ONE of the following options gives the …
Official PYQ2025Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 2 marks
​​​​For a direct-mapped cache, 44 bits are used for the tag field and 1212 bits are used to index into a cache block. The size of each cache block is one byte. Assume that there is no other information stored for each cache block. Which ONE of the following is the CORRECT option for the sizes of the main memory and the cache memory in this system (byte …
Official PYQ2025Compiler DesignParsing (LL, LR)MCQ · 2 marks
​​Given a Context-Free Grammar G\text{G} as follows: S→Aa∣bAc∣dc∣bdaA→d\begin{array}{l} S \rightarrow A a|b A c| d c \mid b d a \\ A \rightarrow d \end{array} Which ONE of the following statements is TRUE?
Official PYQ2025AlgorithmsSearching, Sorting, HashingMCQ · 2 marks
​​An array AA of length nn with distinct elements is said to be bitonic if there is an index 1≤i≤n1 \leq i \leq n such that A[1..i]A[1 . . i] is sorted in the non-decreasing order and A[i+1…n]A[i+1 \ldots n] is sorted in the non-increasing order. Which ONE of the following represents the best possible asymptotic bound for the worst-case number of comparisons …
Official PYQ2025Engineering MathematicsSets, Relations and FunctionsMSQ · 2 marks
​​Let F\mathcal{F} be the set of all functions from {1,…,n}\{1, \ldots, n\} to {0,1}\{0,1\}. Define the binary relation ⩽\leqslant on F\mathcal{F} as follows: ∀f,g∈F,f≼g\forall f, g \in \mathcal{F}, f \preccurlyeq g if and only if ∀x∈{1,…,n},f(x)≤g(x)\forall x \in\{1, \ldots, n\}, f(x) \leq g(x), where 0≤10 \leq 1. Which of the following statement(s) is/are TRUE?
Official PYQ2025Digital LogicMinimization (K-Maps etc.)MSQ · 2 marks
​​​​Given the following Karnaugh Map for a Boolean function F(w,x,y,z)F(w, x, y, z) : Which one or more of the following Boolean expression(s) represent(s) FF ?
Official PYQ2025Programming and Data StructuresArrays, Stacks and QueuesMCQ · 2 marks
​​​Consider a stack data structure into which we can PUSH and POP records. Assume that each record pushed in the stack has a positive integer key and that all keys are distinct. We wish to augment the stack data structure with an O(1)O(1) time MIN operation that returns a pointer to the record with smallest key present in the stack without deleting the …
Official PYQ2025Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMSQ · 2 marks
Consider a system of linear equations PX=QP X=Q where P∈R3×3P \in \mathbb{R}^{3 \times 3} and Q∈R3×1\mathrm{Q} \in \mathbb{R}^{3 \times 1}. Suppose PP has an LU decomposition, P=LUP=L U, where …
Official PYQ2025DatabasesNormal FormsMSQ · 2 marks
​​​​Consider the following relational schema along with all the functional dependencies that hold on them. R1(A,B,C,D,E):{D→E,EA→B,EB→C}R2(A,B,C,D):{A→D,A→B,C→A}\begin{array}{l} R 1(A, B, C, D, E):\{D \rightarrow E, E A \rightarrow B, E B \rightarrow C\} \\ R 2(A, B, C, D):\{A \rightarrow D, A \rightarrow B, C \rightarrow A\} \end{array} Which of the following statement(s) is/are TRUE?
Official PYQ2025Operating SystemMemory Management and Virtual MemoryMCQ · 2 marks
​Consider a demand paging system with three frames, and the following page reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2 . The contents of the frames are as follows initially and after each reference (from left to right): …
Official PYQ2025Operating SystemDeadlockMSQ · 2 marks
P={P1,P2,P3,P4}P=\left\{P_{1}, P_{2}, P_{3}, P_{4}\right\} consists of all active processes in an operating system. R={R1,R2,R3,R4}R=\left\{R_{1}, R_{2}, R_{3}, R_{4}\right\} consists of single instances of distinct types of resources in the system. The resource allocation graph has the following assignment and claim edges. Assignment edges: …
Official PYQ2025Digital LogicNumber Representations (Fixed and Floating Point)MSQ · 2 marks
Three floating point numbers X,YX, Y, and ZZ are stored in three registers RX,RY\mathrm{R}_{\mathrm{X}}, \mathrm{R}_{\mathrm{Y}}, and RZ\mathrm{R}_{\mathrm{Z}}, respectively in IEEEIEEE 754754 single precision format as given below in hexadecimal: …
Official PYQ2025Digital LogicBoolean AlgebraMSQ · 2 marks
Which of the following Boolean algebraic equation(s) is/are CORRECT?