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 PYQ2007AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following segment of C-code: int j, n; j = 1; while (j <= n) j = j * 2; The number of comparisons made in the execution of the loop for any n>0n > 0 is:
Official PYQ2007Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeMCQ · 1 mark
Consider the following program segment. Here R1, R2\text{R1, R2} and R3\text{R3} are the general purpose registers. …
Official PYQ2007Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeMCQ · 1 mark
Consider the following program segment. Here R1, R2\text{R1, R2} and R3\text{R3} are the general purpose registers. …
Official PYQ2007AlgorithmsAlgorithm Design: Greedy TechniquesMCQ · 1 mark
Suppose the letters a, b, c, d, e, fa, \,b, \,c, \,d, \,e, \,f have probabilities 12,14,18,116,132,132\dfrac{1}{2}, \dfrac{1}{4}, \dfrac{1}{8}, \dfrac{1}{16}, \dfrac{1}{32}, \dfrac{1}{32}, respectively. What is the average length of the Huffman code for the letters a, b, c, d, e, fa, \,b, \,c, \,d, \,e, \,f?
Official PYQ2007Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following Finite State Automaton: The minimum state automaton equivalent to the above FSA has the following number of states:
Official PYQ2007Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the CFG with {S,A,B}\left\{S, A, B\right\} as the non-terminal alphabet, {a,b}\{a, b\} as the terminal alphabet, SS as the start symbol and the following set of production rules: S→aBS \rightarrow aB S→bAS \rightarrow bA B→bB \rightarrow b A→aA \rightarrow a B→bSB \rightarrow bS A→aSA \rightarrow aS B→aBBB \rightarrow aBB A→bAAA \rightarrow bAA For …
Official PYQ2007Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A process, has been allocated 33 page frames. Assume that none of the pages of the process are available in the memory initially. The process makes the following sequence of page references (reference string): 1,2,1,3,7,4,5,6,3,11, 2, 1, 3, 7, 4, 5, 6, 3, 1 Least Recently Used (LRU) page replacement policy is a practical approximation to optimal page replacement. For …
Official PYQ2007Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a machine with a byte addressable main memory of 2162^{16} bytes. Assume that a direct mapped data cache consisting of 3232 lines of 6464 bytes each is used in the system. A 5050 x 5050 two-dimensional array of bytes is stored in the main memory starting from memory location 1100H1100H. Assume that the data cache is initially empty. The …
Official PYQ2007Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsMCQ · 1 mark
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at (i,j)(i,j) then it can move to either (i+1,j)(i + 1, j) or (i,j+1)(i,j + 1). Suppose that the robot is not allowed to traverse the line segment from (4,4)(4,4) to (5,4)(5,4). With this constraint, how many distinct paths …
Official PYQ2007AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Consider the DAG with V={1,2,3,4,5,6}V = \{1,2,3,4,5,6\} shown below. Which of the following is not a topological ordering?
Official PYQ2007DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Information about a collection of students is given by the relation studInfo(studId‾, name, sex)\text{studInfo(}\underline{\text{studId}},\text{ name, sex)}. The relation enroll(studId, courseId)\text{enroll(}{\text{studId}},{\text{ courseId}}) gives which student has enrolled for (or taken) what course(s). Assume that every course is taken by at least one male and at least one female student. What …
Official PYQ2007Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsMCQ · 1 mark
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at (i,j)(i,j) then it can move to either (i+1,j)(i + 1, j) or (i,j+1)(i,j + 1). How many distinct paths are there for the robot to reach the point (10,10)(10,10) starting from the initial position (0,0)(0,0)?
Official PYQ2007Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A process has been allocated 33 page frames. Assume that none of the pages of the process are available in the memory initially. The process makes the following sequence of page references (reference string): 1,2,1,3,7,4,5,6,3,1\mathbf{1, 2, 1, 3, 7, 4, 5, 6, 3, 1} If optimal page replacement policy is used, how many page faults occur for the above reference string?
Official PYQ2007Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the CFG with {S,A,B}\left\{S, A, B\right\} as the non-terminal alphabet, {a,b}\{a, b\} as the terminal alphabet, SS as the start symbol and the following set of production rules: S→aBS \rightarrow aB S→bAS \rightarrow bA B→bB \rightarrow b A→aA \rightarrow a B→bSB \rightarrow bS A→aSA \rightarrow aS B→aBBB \rightarrow aBB A→bAAA \rightarrow bAA Which …
Official PYQ2007AlgorithmsAlgorithm Design: Greedy TechniquesMCQ · 1 mark
Suppose the letters a, b, c, d, e, fa, \,b, \,c, \,d, \,e, \,f have probabilities 12,14,18,116,132,132\frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \frac{1}{16}, \frac{1}{32}, \frac{1}{32}, respectively. Which of the following is the Huffman code for the letter a, b, c, d, e, fa, \,b, \,c, \,d, \,e, \,f?
Official PYQ2007Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a machine with a byte addressable main memory of 2162^{16} bytes. Assume that a direct mapped data cache consisting of 3232 lines of 6464 bytes each is used in the system. A 50×5050 \times 50 two-dimensional array of bytes is stored in the main memory starting from memory location 1100H1100H. Assume that the data cache is initially empty. The …
Official PYQ2007Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following Finite State Automaton: The language accepted by this automaton is given by the regular expression
Official PYQ2007Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeMCQ · 1 mark
Consider the following program segment. Here R1, R2\text{R1, R2} and R3\text{R3} are the general purpose registers. …
Official PYQ2007Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
Match the following: …
Official PYQ2007Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
The distance between two stations MM and NN is LL kilometers. All frames are KK bits long. The propagation delay per kilometer is tt seconds. Let RR bits/second be the channel capacity. Assuming that the processing delay is negligible, the minimum\text{minimum} number of bits for the sequence number field in a frame for maximum utilization, …