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 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 …
Official PYQ2021Theory of ComputationRegular Expressions and Finite AutomataMCQ · 2 marks
Suppose we want to design a synchronous circuit that processes a string of 00’s and 11’s. Given a string, it produces another string by replacing the first 11 in any subsequence of consecutive 11’s by a 00. Consider the following example. …
Official PYQ2021Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 2 marks
In an examination, a student can choose the order in which two questions (QuesA\textsf{QuesA} and QuesB\textsf{QuesB}) must be attempted. If the first question is answered wrong, the student gets zero marks. If the first question is answered correctly and the second question is not answered correctly, the student gets the marks only for the first question. If …
Official PYQ2021AlgorithmsAlgorithm Design: Greedy TechniquesMCQ · 2 marks
Consider the string abbccddeee\textrm{abbccddeee}. Each letter in the string must be assigned a binary code satisfying the following properties: For any two letters, the code assigned to one letter must not be a prefix of the code assigned to the other letter. For any two letters of the same frequency, the letter which occurs earlier in the dictionary order is …
Official PYQ2021Compiler DesignLocal OptimizationMCQ · 2 marks
​​​​​​Consider the following ANSI C\text{ANSI C} code segment: z=x + 3 + y->f1 + y->f2; for (i = 0; i < 200; i = i + 2) { if (z > i) { p = p + x + 3; q = q + y->f1; } else { p = p + y->f2; q = q + x + 3; } } Assume that the variable yy points to a struct\textsf{struct} (allocated on the heap) containing two fields f1\textsf{f1} and …
Official PYQ2021DatabasesTuple Calculus and SQLMCQ · 2 marks
The relation scheme given below is used to store information about the employees of a company, where empId\textsf{empId} is the key and deptId\textsf{deptId} indicates the department to which the employee is assigned. Each employee is assigned to exactly one department. emp(empId‾, name, gender, salary, deptId)\textsf{emp($\underline{\textsf{empId}}$, name, gender, salary, deptId)} Consider the …
Official PYQ2021Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 2 marks
Consider the cyclic redundancy check (CRC)\text{(CRC)} based error detecting scheme having the generator polynomial X3+X+1X^3+X+1. Suppose the message m4m3m2m1m0=11000m_4m_3m_2m_1m_0=11000 is to be transmitted. Check bits c2c1c0c_2c_1c_0 are appended at the end of the message by the transmitter using the above CRC\text{CRC} scheme. The transmitted bit string is denoted by …
Official PYQ2021Programming and Data StructuresProgramming in CMCQ · 2 marks
Consider the following ANSI C\text{ANSI C} program: #include <stdio.h> #include <stdlib.h> struct Node{ int value; struct Node *next;}; int main( ) { struct Node *boxE, *head, *boxN; int index=0; boxE=head= (struct Node *) malloc(sizeof(struct Node)); head → value = index; for (index =1; index<=3; index++){ boxN = (struct Node *) malloc …
Official PYQ2021DatabasesTransactions and Concurrency ControlMCQ · 2 marks
​​​​​Let SS be the following schedule of operations of three transactions T1T_1, T2T_2 and T3T_3 in a relational database system: R2(Y),R1(X),R3(Z),R1(Y)W1(X),R2(Z),W2(Y),R3(X),W3(Z)R_2(Y), R_1(X), R_3(Z), R_1(Y)W_1(X), R_2(Z), W_2(Y), R_3(X), W_3(Z) Consider the statements PP and QQ below: PP: SS is conflict-serializable. QQ: If T3T_3 commits before T1T_1 finishes, then SS …
Official PYQ2021Theory of ComputationRegular and Context-free LanguagesMCQ · 2 marks
​​​​​​Consider the following two statements about regular languages: S1S_1: Every infinite regular language contains an undecidable language as a subset. S2S_2: Every finite language is regular. Which one of the following choices is correct?
Official PYQ2021Engineering MathematicsSets, Relations and FunctionsMCQ · 2 marks
For two nn-dimensional real vectors PP and QQ, the operation s(P,Q)s(P,Q) is defined as follows: s(P,Q)=∑i=1n(P[i]⋅Q[i])s(P,Q) = \displaystyle \sum_{i=1}^n (P[i] \cdot Q[i]) Let L\mathcal{L} be a set of 1010-dimensional non-zero real vectors such that for every pair of distinct vectors P,Q∈LP,Q \in \mathcal{L}, s(P,Q)=0s(P,Q)=0. What is the maximum cardinality possible …
Official PYQ2021AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 2 marks
For constants a≥1a \geq 1 and b>1b>1, consider the following recurrence defined on the non-negative integers: T(n)=a⋅T(nb)+f(n)T(n) = a \cdot T \left(\dfrac{n}{b} \right) + f(n) Which one of the following options is correct about the recurrence T(n)T(n)?
Official PYQ2021DatabasesNormal FormsMSQ · 2 marks
Suppose the following functional dependencies hold on a relation UU with attributes P,Q,R,SP,Q,R,S, and TT: P→QRP \rightarrow QR RS→TRS \rightarrow T Which of the following functional dependencies can be inferred from the above functional dependencies?
Official PYQ2021Theory of ComputationContext-free Grammars and Push-down AutomataMSQ · 2 marks
For a string ww, we define wRw^R to be the reverse of ww. For example, if w=01101w=01101 then wR=10110w^R=10110. Which of the following languages is/are context-free?