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 PYQ2021Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
Consider the three-way handshake mechanism followed during TCP\text{TCP} connection establishment between hosts PP and QQ. Let XX and YY be two random 3232-bit starting sequence numbers chosen by PP and QQ respectively. Suppose PP sends a TCP\text{TCP} connection request message to QQ with a TCP\text{TCP} segment having …
Official PYQ2021AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size nn?
Official PYQ2021Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let L⊆{0,1}∗L \subseteq \{0,1\}^* be an arbitrary regular language accepted by a minimal DFA\text{DFA} with kk states. Which one of the following languages must necessarily be accepted by a minimal DFA\text{DFA} with kk states?
Official PYQ2021Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following ANSI C\text{ANSI C} program. #include <stdio.h> int main() { int arr[4][5]; int i, j; for (i=0; i<4; i++) ​​​​​​{ for (j=0; j<5; j++) { arr[i][j] = 10 * i + j; } } printf(“%d”, *(arr[1]+9)); return 0; } What is the output of the above program?
Official PYQ2021Engineering MathematicsSets, Relations and FunctionsMSQ · 1 mark
Consider the following sets, where n≥2n \geq 2: S1S_1: Set of all n×nn \times n matrices with entries from the set {a,b,c}\{ a, b, c\} S2S_2: Set of all functions from the set {0,1,2,…,n2−1}\{0,1,2, \dots, n^2-1\} to the set {0,1,2}\{0, 1, 2\} Which of the following choice(s) is/are correct?
Official PYQ2021Theory of ComputationRegular and Context-free LanguagesMSQ · 1 mark
Let L1L_1 be a regular language and L2L_2 be a context-free language. Which of the following languages is/are context-free?
Official PYQ2021Compiler DesignIntermediate Code GenerationMCQ · 1 mark
In the context of compilers, which of the following is/are NOT\text{NOT} an intermediate representation of the source program?
Official PYQ2021Operating SystemCPU SchedulingMSQ · 1 mark
Which of the following statement(s) is/are correct in the context of CPU\text{CPU} scheduling?
Official PYQ2021Engineering MathematicsPropositional and First Order LogicMSQ · 1 mark
Choose the correct choice(s) regarding the following proportional logic assertion SS: S:((P∧Q)→R)→((P∧Q)→(Q→R))S: (( P \wedge Q) \rightarrow R) \rightarrow (( P \wedge Q) \rightarrow (Q \rightarrow R))
Official PYQ2021Programming and Data StructuresTreesNAT · 1 mark
Consider a complete binary tree with 77 nodes. Let AA denote the set of first 33 elements obtained by performing Breadth-First Search (BFS)\text{(BFS)} starting from the root. Let BB denote the set of first 33 elements obtained by performing Depth-First Search (DFS)\text{(DFS)} starting from the root. The value of ∣A−B∣\mid A-B \mid is …
Official PYQ2021Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
Consider the following deterministic finite automaton (DFA)\text{(DFA)} The number of strings of length 88 accepted by the above automaton is ___________
Official PYQ2021Digital LogicNumber Representations (Fixed and Floating Point)NAT · 1 mark
If xx and yy are two decimal digits and (0.1101)2=(0.8xy5)10(0.1101)_2 = (0.8xy5)_{10}, the decimal value of x+yx+y is ___________
Official PYQ2021Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 1 mark
Consider a set-associative cache of size 2KB (1KB=210\text{2KB (1KB} =2^{10} bytes)\text{)} with cache block size of 6464 bytes. Assume that the cache is byte-addressable and a 3232 -bit address is used for accessing the cache. If the width of the tag field is 2222 bits, the associativity of the cache is _________
Official PYQ2021Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeNAT · 1 mark
Consider a computer system with DMA\text{DMA} support. The DMA\text{DMA} module is transferring one 88-bit character in one CPU\text{CPU} cycle from a device to memory through cycle stealing at regular intervals. Consider a 2 MHz\text{2 MHz} processor. If 0.5%0.5 \% processor cycles are used for DMA\text{DMA}, the data transfer rate of the device is …
Official PYQ2021DatabasesFile Organization and Indexing (B and B+ Trees)NAT · 1 mark
A data file consisting of 1,50,0001,50,000 student-records is stored on a hard disk with block size of 40964096 bytes. The data file is sorted on the primary key RollNo\textrm{RollNo}. The size of a record pointer for this disk is 77 bytes. Each student-record has a candidate key attribute called ANum\textrm{ANum} of size 1212 bytes. Suppose an index file …
Official PYQ2021Engineering MathematicsProbability: Random Variables and DistributionsNAT · 1 mark
For a given biased coin, the probability that the outcome of a toss is a head is 0.40.4. This coin is tossed 1,0001,000 times. Let XX denote the random variable whose value is the number of times that head appeared in these 1,0001,000 tosses. The standard deviation of XX (rounded to 22 decimal place) is _________
Official PYQ2021AlgorithmsAsymptotic Worst Case Time and Space ComplexityNAT · 1 mark
Consider the following ANSI C\text{ANSI C} function: int SomeFunction (int x, int y) { if ((x==1) || (y==1)) return 1; if (x==y) return x; if (x > y) return SomeFunction(x-y, y); if (y > x) return SomeFunction (x, y-x); } The value returned by SomeFunction(15, 255)\textrm{SomeFunction(15, 255)} is __________
Official PYQ2021Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsNAT · 1 mark
Suppose that PP is a 4×54 \times 5 matrix such that every solution of the equation Px=0\text{Px=0} is a scalar multiple of [25431]T\begin{bmatrix} 2 & 5 & 4 &3 & 1 \end{bmatrix}^T. The rank of PP is __________
Official PYQ2021Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityNAT · 1 mark
Suppose that f:R→Rf: \mathbb{R} \rightarrow \mathbb{R} is a continuous function on the interval [−3,3][-3, 3] and a differentiable function in the interval (−3,3)(-3,3) such that for every xx in the interval, f’(x)≤2f’(x) \leq 2. If f(−3)=7f(-3)=7, then f(3)f(3) is at most __________
Official PYQ2021Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 2 marks
​​​​​​Assume a two-level inclusive cache hierarchy, L1L1 and L2L2, where L2L2 is the larger of the two. Consider the following statements. S1S_1: Read misses in a write through L1L1 cache do not result in writebacks of dirty lines to the L2L2 S2S_2: Write allocate policy must be used in conjunction with write through caches and no-write …