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 PYQ2022AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Which one of the following statements is TRUE\text{TRUE} for all positive functions f(n)?f(n)?
Official PYQ2022Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Which one of the following regular expressions correctly represents the language of the finite automaton given below?
Official PYQ2022Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which one of the following statements is TRUE?\text{TRUE}?
Official PYQ2022Programming and Data StructuresLinked ListsMCQ · 1 mark
Consider the problem of reversing a singly linked list. To take an example, given the linked list below, the reversed linked list should look like Which one of the following statements is TRUE\text{TRUE} about the time complexity of algorithms that solve the above problem in O(1)O(1) space?
Official PYQ2022DatabasesNormal FormsMCQ · 1 mark
In a relational data model, which one of the following statements is TRUE?\text{TRUE}?
Official PYQ2022AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
​​​Suppose we are given nn keys, mm hash table slots, and two simple uniform hash functions h1h_{1} and h2.h_{2}. Further suppose our hashing scheme uses h1h_{1} for the odd keys and h2h_{2} for the even keys. What is the expected number of keys in a slot?
Official PYQ2022Operating SystemConcurrency and SynchronizationMCQ · 1 mark
Consider the following threads, T1,T2,\text{T}_{1}, \text{T}_{2}, and T3\text{T}_{3} executing on a single processor, synchronized using three binary semaphore variables, S1,S2,\text{S}_{1}, \text{S}_{2}, and S3,\text{S}_{3}, operated upon using standard wait()\textsf{wait}() and signal().\textsf{signal}(). The threads can be context switched in any order and at any …
Official PYQ2022Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
Let R1\text{R1} and R2\text{R2} be two 4–bit4 – \text{bit} registers that store numbers in 2’s2\text{’s} complement form. For the operation R1 + R2,\text{R1 + R2}, which one of the following values of R1\text{R1} and R2\text{R2} gives an arithmetic overflow?
Official PYQ2022Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
Consider the following two statements with respect to the matrices Am×n,Bn×m,Cn×n\textit{A}_{m \times n}, \textit{B}_{n \times m}, \textit{C}_{n \times n} and Dn×n.\textit{D}_{n \times n}. Statement 1:tr(AB)=tr(BA)1: tr \text{(AB)} = tr \text{(BA)} Statement 2:tr(CD)=tr(DC)2: tr \text{(CD)} = tr \text{(DC)} where tr()tr() represents the trace of a matrix. Which one of the following holds?
Official PYQ2022Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeMCQ · 1 mark
Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
Official PYQ2022Programming and Data StructuresProgramming in CMCQ · 1 mark
What is printed by the following ANSI C\text{ANSI C} program? #include<stdio.h> int main(int argc, char *argv[]) { int x = 1, z[2] = {10, 11}; int *p = NULL; p = &x; *p = 10; p = &z[1]; *(&z[0] + 1) += 3; printf(“%d, %d, %d\n”, x, z[0], z[1]); return 0; }
Official PYQ2022Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below. What is the number of subnets inside the enterprise network?
Official PYQ2022Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMSQ · 1 mark
Let WB\text{WB} and WT\text{WT} be two set associative cache organizations that use LRU\text{LRU} algorithm for cache block replacement. WB\text{WB} is a write back cache and WT\text{WT} is a write through cache. Which of the following statements is/are FALSE?\text{FALSE}?
Official PYQ2022Theory of ComputationRegular and Context-free LanguagesMSQ · 1 mark
Which of the following statements is/are TRUE?\text{TRUE}?
Official PYQ2022Operating SystemDeadlockMSQ · 1 mark
Which of the following statements is/are TRUE\text{TRUE} with respect to deadlocks?
Official PYQ2022DatabasesRelational Model: Relational AlgebraMSQ · 1 mark
Consider the following three relations in a relational database. Employee(eId‾,Name),  Brand(bId‾,bName),  Own(eId‾,bId‾)\text{Employee} (\underline{\text{eId}},\text{Name}), \; \text{Brand}(\underline{\text{bId}},\text{bName}), \; \text{Own}(\underline{\text{eId}},\underline{\text{bId}}) Which of the following relational algebra expressions return the set of elds\textit{elds} who own all the brands?
Official PYQ2022Engineering MathematicsMonoids and GroupsMSQ · 1 mark
Which of the following statements is/are TRUE\text{TRUE} for a group G?\textit{G}?
Official PYQ2022Programming and Data StructuresBinary Search TreesNAT · 1 mark
Suppose a binary search tree with 10001000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that the array indices start with 0,0, the 3rd3^{\text{rd}} largest element of the tree is stored at index ______________ .
Official PYQ2022Compiler DesignParsing (LL, LR)NAT · 1 mark
Consider the augmented grammar with {+,∗,(,),id}\{ +, {\ast}, (,),\text{id} \} as the set of terminals. S’→SS’ \rightarrow S S→S+R  ∣  RS \rightarrow S + R\; |\; R R→R∗P  ∣  PR \rightarrow R {\ast} P \;| \;P P→(S)  ∣  idP \rightarrow (S)\; |\; \text{id} If I0I_{0} is the set of two LR(0)\textit{LR}(0) items {[S’→S.],[S→S.+R]}\{ [S’ \rightarrow S.], [S \rightarrow S. + R] \}, then …
Official PYQ2022Engineering MathematicsGraphs: Connectivity, Matching, ColouringNAT · 1 mark
Consider a simple undirected graph of 1010 vertices. If the graph is disconnected, then the maximum number of edges it can have is _______________ .