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 PYQ2017Programming and Data StructuresRecursionMCQ · 1 mark
Consider the following two functions. void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf("%d", n); fun1(++n); printf("%d", n); } The output printed when fun1(5)\text{fun1}(5) is called is
Official PYQ2017Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
If GG is a grammar with productions S→SaS∣aSb∣bSa∣SS∣ϵS\rightarrow SaS\mid aSb\mid bSa\mid SS\mid\epsilon where SS is the start variable, then which one of the following strings is not generated by GG?
Official PYQ2017Digital LogicSequential CircuitsMCQ · 1 mark
Consider a combination of T\text{T} and D\text{D} flip-flops connected as shown below. The output of the D\text{D} flip-flop is connected to the input of the T\text{T} flip-flop and the output of the T\text{T} flip-flop is connected to the input of the D\text{D} flip-flop. Initially, both Q0Q_{0} and Q1Q_{1} are set to 11 (before the …
Official PYQ2017Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
A computer network uses polynomials over GF(2)GF(2) for error checking with 88 bits as information bits and uses x3+x+1x^{3}+x+1 as the generator polynomial to generate the check bits. In this network, the message 0101101101011011 is transmitted as:
Official PYQ2017Engineering MathematicsEigenvalues and Eigenvectors, LU DecompositionMCQ · 1 mark
Let AA be n×nn\times n real valued square symmetric matrix of rank 22 with ∑i=1n∑j=1nAij2=50.\sum_{i=1}^{n}\sum_{j=1}^{n}A^{2}_{ij} = 50. Consider the following statements. One eigenvalue must be in [−5,5]\left [ -5,5 \right ] The eigenvalue with the largest magnitude must be strictly greater than 55 Which of the above statements about eigenvalues of AA is/are …
Official PYQ2017Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
Let pp, qq and rr be propositions and the expression (p→q)→r\left ( p\rightarrow q \right )\rightarrow r be a contradiction. Then, the expression (r→p)→q\left ( r\rightarrow p \right )\rightarrow q is
Official PYQ2017Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
Let uu and vv be two vectors in R2\mathbf{R}^{2} whose Euclidean norms satisfy ∥u∥=2∥v∥\left \| u \right \| = 2\left \| v \right \|. What is the value of α\alpha such that w=u+αvw = u + \alpha v bisects the angle between uu and vv?
Official PYQ2017Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityMCQ · 1 mark
The value of lim⁡x→1x7−2x5+1x3−3x2+2\displaystyle \lim_{x\rightarrow 1} \frac{x^{7}-2x^{5}+1}{x^{3}-3x^{2}+2}
Official PYQ2017AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Let G=(V,E)G=\left ( V,E \right ) be anyany connected, undirected, edge-weighted graph. The weights of the edges in EE are positive and distinct. Consider the following statements: Minimum Spanning Tree of GG is always unique. Shortest path between any two vertices of GG is always unique. Which of the above statements is/are necessarily true?
Official PYQ2017Operating SystemConcurrency and SynchronizationMCQ · 1 mark
A multithreaded program PP executes with xx number of threads and uses yy number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock ll, then it cannot re-acquire lock ll without releasing it. If a thread is unable to acquire a lock, it …
Official PYQ2017Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 1 mark
Consider a two-level cache hierarchy with L1L1 and L2L2 caches. An application incurs 1.41.4 memory accesses per instruction on average. For this application, the miss rate of L1L1 cache is 0.10.1; the L2L2 cache experiences, on average, 77 misses per 10001000 instructions. The miss rate of L2L2 expressed correct to two decimal places is …
Official PYQ2017Operating SystemCPU SchedulingNAT · 1 mark
Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below: …
Official PYQ2017DatabasesTuple Calculus and SQLNAT · 1 mark
Consider a database that has the relation schema EMP (EmpId, EmpName, and DeptName). An instance of the schema EMP and a SQL query on it are given below: …
Official PYQ2017Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
Consider the language LL given by the regular expression (a+b)∗b(a+b)(a+b)^{*} b (a+b) over the alphabet {a,b}\{a,b\}. The smallest number of states needed in a deterministic finite-state automaton (DFA) accepting LL is ___________ .
Official PYQ2017Programming and Data StructuresTreesNAT · 1 mark
Let TT be a tree with 1010 vertices. The sum of the degrees of all the vertices in TT is ________
Official PYQ2017Digital LogicMinimization (K-Maps etc.)NAT · 1 mark
Consider the Karnaugh map given below, where XX represents "don't care" and blank represents 00. Assume for all inputs (a,b,c,d)\left ( a,b,c,d \right ), the respective complements (aˉ,bˉ,cˉ,dˉ)\left ( \bar{a}, \bar{b}, \bar{c}, \bar{d} \right ) are also available. The above logic is implemented using 22-input NOR\text{NOR} gates only. The minimum number of …
Official PYQ2017Engineering MathematicsProbability: Random Variables and DistributionsNAT · 1 mark
Let XX be a Gaussian random variable with mean 0 and variance σ2\sigma ^{2}. Let YY = max⁡(X,0)\max\left ( X,0 \right ) where max⁡(a,b)\max\left ( a,b \right ) is the maximum of aa and bb. The median of YY is ______________ .
Official PYQ2017Operating SystemProcesses and ThreadsMCQ · 1 mark
Threads of a process share
Official PYQ2017DatabasesNormal FormsMCQ · 1 mark
The following functional dependencies hold true for the relational schema R{V,W,X,Y,Z}R\left \{V,W,X,Y,Z \right \}: V→WV \rightarrow W VW→XVW \rightarrow X Y→VXY \rightarrow VX Y→ZY \rightarrow Z Which of the following is irreducible equivalent for this set of functional dependencies?
Official PYQ2017Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
A sender SS sends a message mm to receiver RR, which is digitally signed by SS with its private key. In this scenario, one or more of the following security violations can take place. SS can launch a birthday attack to replace mm with a fraudulent message AA third party attacker can launch a birthday attack to replace mm with a …