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 PYQ2026General AptitudeMCQ · 2 marks
For positive real numbers SS and KK, the function HK(S)H_{K}(S) is defined as: HK(S)=max⁡(S−K,0)H_{K}(S)=\max (S-K, 0). The max function is defined as: max⁡(a,b)={a, when a>bb, when a≤b\max (a, b)=\left\{\begin{array}{ll} a, & \text{ when } a>b \\ b, & \text{ when } a \leq b \end{array}\right. The graph below shows the plot of a function N(S)N(S) versus SS. N(S)N(S) can be …
Official PYQ2026Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
An urn contains one red ball and one blue ball. At each step, a ball is picked uniformly at random from the urn, and this ball together with another ball of the same color is put back in the urn. The probability that there are equal number of red and blue balls after two steps is
Official PYQ2026Engineering MathematicsEigenvalues and Eigenvectors, LU DecompositionMCQ · 1 mark
For n>1n>1, the maximum multiplicity of any eigenvalue of an n×nn \times n matrix with elements from R\mathbb{R} is
Official PYQ2026Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Match each addressing mode in List I\textbf{List I} with a data element or an element of a data structure (in a high-level language) in List II\textbf{List II}: …
Official PYQ2026Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Consider a processor P\text{P} whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any instruction is the destination operand. Which one of the following sequences of instructions corresponds to the high-level language statement Z=X+Y\mathrm{Z}=\mathrm{X}+\mathrm{Y} ? Note: X, Y, and Z …
Official PYQ2026Computer Organization and ArchitecturePipeline HazardsMCQ · 1 mark
Which one of the following dependencies among the register operands of different instructions can cause a data hazard in a pipelined processor?
Official PYQ2026AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following recurrence relations: For all n>1n>1, T1(n)=4T1(n2)+T2(n)T2(n)=5T2(n4)+Θ(log⁡2n)\begin{array}{c} T_{1}(n)=4 T_{1}\left(\frac{n}{2}\right)+T_{2}(n) \\ T_{2}(n)=5 T_{2}\left(\frac{n}{4}\right)+\Theta\left(\log _{2} n\right) \end{array} Assume that for all n≤1,T1(n)=1n \leq 1, T_{1}(n)=1 and T2(n)=1T_{2}(n)=1. Which one of the following options is correct?
Official PYQ2026General AptitudeMCQ · 2 marks
An unbiased six-faced dice whose faces are marked with numbers 1,2,3,4,51,2,3,4,5, and 66 is rolled twice in succession and the number on the top face is recorded each time. The probability that the number appearing in the second roll is an integer multiple of the number appearing in the first roll is ____\_\_\_\_
Official PYQ2026Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
With respect to a TCP connection between a client and a server, which one of the following statements is true?
Official PYQ2026Computer NetworksApplication Layer Protocols: DNS, SMTP, HTTP, FTP, EmailMSQ · 1 mark
Which of the following statements is/are true with respect to the interaction of a web browser with a web server using HTTP 1.11.1?
Official PYQ2026Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMSQ · 1 mark
Let n>1n>1. Consider an n×nn \times n matrix MM with its elements from R\mathbb{R}. Let the vector (0,1,0,0,…,0)∈Rn(0,1,0,0, \ldots, 0) \in \mathbb{R}^{n} be in the null space of MM. Which of the following options is/are always correct?
Official PYQ2026Digital LogicNumber Representations (Fixed and Floating Point)MSQ · 1 mark
Consider the 88 -bit signed integers X,YX, Y and ZZ represented using the sign-magnitude form. The binary representations of XX and YY are as follows: X:10110100Y:01001100X: 10110100 \quad Y: 01001100 Which of the following operations to compute ZZ result(s) in an arithmetic overflow?
Official PYQ2026AlgorithmsSearching, Sorting, HashingMSQ · 1 mark
Let nn be an odd number greater than 100100. Consider a binary minheap with nn elements stored in an array PP whose index starts from 11. Which of the following indices of PP do/does NOT correspond to any leaf node of the minheap?
Official PYQ2026AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Consider a hash table P[0,1,…,10]P[0,1, \ldots, 10] that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is h(x)=(x+7) mod 11h(x)=(x+7) \bmod 11. Consider the following sequence of insertions performed on PP :  1,13, 22, 15, 11, 24\text{ 1,13, 22, 15, 11, } 24 Which of the following positions in the hash table is/are empty …
Official PYQ2026Digital LogicBoolean AlgebraMSQ · 1 mark
Consider the following Boolean expression of a function FF : F(P,Q)=(Pˉ+Q)⊕(PˉQ)F(P, Q)=(\bar{P}+Q) \oplus(\bar{P} Q) Which of the following expressions is/are equivalent to FF ?
Official PYQ2026Theory of ComputationContext-free Grammars and Push-down AutomataMSQ · 1 mark
Consider the following grammar where SS is the start symbol, and aa and bb are terminal symbols. S→aSbS | bS | ϵS \rightarrow a S b S \text{ | } b S \text{ | } \epsilon Which of the following statements is/are true?
Official PYQ2026Theory of ComputationRegular Expressions and Finite AutomataMSQ · 1 mark
Let MM be a nondeterministic finite automaton (NFA) with 66 states over a finite alphabet. Which of the following options CANNOT be the number of states in the minimal deterministic finite automaton (DFA) that is equivalent to MM ?
Official PYQ2026Compiler DesignLexical AnalysisMCQ · 1 mark
Consider the following C statements: char *str1 = "Hello; /* Statement S1 */ char *str2 = "Hello;"; /* Statement S2 */ int *str3 = "Hello"; /* Statement S3 */ Which of the following options is/are correct?
Official PYQ2026Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which of the following statements is/are true?
Official PYQ2026Operating SystemDeadlockMSQ · 1 mark
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?