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 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 …
Official PYQ2017Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following C code: #include<stdio.h> int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return; x = assignval (x,0); if (x) { x = (int *)malloc(sizeof(int)); if (NULL == x) return; x = assignval (x,10); } printf("%d\n", *x); free(x); } The code suffers from which one of the …
Official PYQ2017Compiler DesignIntermediate Code GenerationMCQ · 1 mark
Consider the following intermediate program in three address code p = a - b q = p * c p = u * v q = p + q Which one of the following corresponds to a static single assignment form of the above code?
Official PYQ2017Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Consider the CC struct defined below: struct data { int marks [100]; char grade; int cnumber; }; struct data student; The base address of student is available in register R1R1. The field student.grade can be accessed efficiently using:
Official PYQ2017Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the following context-free grammar over the alphabet Σ={a,b,c}\Sigma = \{a,b,c\} with SS as the start symbol:S→abScT∣abcTS \rightarrow abScT \mid abcTT→bT∣bT \rightarrow bT \mid bWhich one of the following represents the language generated by the above grammar?
Official PYQ2017Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
When two 8-bit8\text{-bit} numbers A7⋯A0A_{7}\cdots A_{0} and B7⋯B0B_{7}\cdots B_{0} in 22's complement representation (with A0A_{0} and B0B_{0} as the least significant bits) are added using a ripple-carry adder, the sum bits obtained are S7⋯S0S_{7}\cdots S_{0} and the carry bits are C7⋯C0C_{7}\cdots C_{0}. An overflow is said to have occurred if