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 PYQ2009Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let L=L1∩L2L = L_1 \cap L_2, where L1L_1 and L2L_2 are languages as defined below: L1={ambmcanbn∣m,n≥0}L_1= \left \{ a^m b^mca^nb^n \mid m,n \geq 0 \right \} L2={aibjck∣i,j,k≥0}L_2=\left \{ a^i b^j c^k \mid i,j,k \geq 0 \right \} Then LL is
Official PYQ2009AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
In quick-sort, for sorting nn elements, the (n/4)th\left(n/4\right)^{th} smallest element is selected as pivot using an O(n)O(n) time algorithm. What is the worst case time complexity of the quick sort?
Official PYQ2009Programming and Data StructuresBinary Search TreesMCQ · 1 mark
What is the maximum height of any AVL-tree with 77 nodes? Assume that the height of a tree with a single node is 00.
Official PYQ2009AlgorithmsMinimum Spanning TreesMCQ · 1 mark
Consider the following graph: Which one of the following is NOT the sequence of edges added to the minimum spanning tree using Kruskal’s algorithm?
Official PYQ2009Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
The keys 12,18,13,2,3,23,512, 18, 13, 2, 3, 23, 5 and 1515 are inserted into an initially empty hash table of length 1010 using open addressing with hash function h(k)=kmod  10h(k) = k \mod 10 and linear probing. What is the resultant hash table?
Official PYQ2009AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
The running time of an algorithm is represented by the following recurrence relation: T(n)={nn≤3T(n3)+cn otherwise T(n) = \begin{cases} n & n \leq 3 \\ T(\frac{n}{3})+cn & \text{ otherwise } \end{cases} Which one of the following represents the time complexity of the algorithm?
Official PYQ2009Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because
Official PYQ2009Operating SystemConcurrency and SynchronizationMCQ · 1 mark
The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows: void enter_CS(X) { while(test-and-set(X)); } void leave_CS(X) { X = 0; } In the above solution, XX is a memory location associated with the CSCS and is initialized to 00. Now consider the following statements: The …
Official PYQ2009Operating SystemCPU SchedulingMCQ · 1 mark
In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements: If a process makes a transition DD, it would result in another process making transition AA immediately. A process P2P_2 in blocked state can make transition E while …
Official PYQ2009Operating SystemI/O SchedulingMCQ · 1 mark
Consider a disk system with 100100 cylinders. The requests to access the cylinders occur in following sequence: 4,34,10,7,19,73,2,15,6,204, 34, 10, 7, 19, 73, 2, 15, 6, 20 Assuming that the head is currently at cylinder 5050, what is the time taken to satisfy all requests if it takes 1  ms1\;\text{ms} to move from one cylinder to adjacent one and shortest seek time first …
Official PYQ2009Operating SystemDeadlockMCQ · 1 mark
Consider a system with 44 types of resources R1R1 (33 units), R2R2 (22 units), R3R3 (33 units), R4R4 (22 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1P1, P2P2, P3P3 request the resources as follows if …
Official PYQ2009Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a 44-way set associative cache (initially empty) with total 1616 cache blocks. The main memory consists of 256256 blocks and the request for memory blocks are in the following order: 0,255,1,4,3,8,133,159,216,129,63,8,48,32,73,92,155.0, 255, 1, 4, 3, 8, 133, 159, 216, 129, 63, 8, 48, 32, 73, 92, 155. Which one of the following memory block will NOT be in cache if LRU replacement policy is …
Official PYQ2009Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
Consider a 44 stage pipeline processor. The number of cycles needed by the four instructions I1,I2,I3,I4I1, I2, I3, I4 in stages S1,S2,S3,S4S1, S2, S3, S4 is shown below: …
Official PYQ2009Digital LogicSequential CircuitsMCQ · 1 mark
Given the following state table of an FSM with two states AA and BB,one input and one output. …
Official PYQ2009Web Technologies (Historical)MCQ · 1 mark
Consider a HTML table definition given below: <table border =1> <tr> <td rowspan=2> ab </td> <td colspan=2> cd </td> </tr> <tr> <td> ef </td> <td rowspan=2> gh </td> </tr> <tr> <td colspan=2> ik </td> </tr> </table> The number of rows in each column …
Official PYQ2009Software Engineering (Historical)MCQ · 1 mark
The coupling between different modules of a software is categorized as follows: Content coupling Common coupling Control coupling Stamp coupling Data coupling Coupling between modules can be ranked in the order of strongest (least desirable) to weakest (most desirable) as follows:
Official PYQ2009AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
Consider the program below: #include <stdio.h> int fun(int n, int *f_p) { int t, f; if (n <= 1) { *f_p = 1; return 1; } t = fun(n-1, f_p); f = t + *f_p; *f_p = t; return f; } int main() { int x = 15; printf("%d/n", fun(5, &x)); return 0; } The value printed is:
Official PYQ2009Compiler DesignLexical AnalysisMCQ · 1 mark
Match all items in Group 1 with the correct options from those given in Group 2. …
Official PYQ2009Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Which one of the following is FALSE?
Official PYQ2009Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Which one of the following languages over the alphabet {0,1}\{0,1\} is described by the regular expression: (0+1)∗0(0+1)∗0(0+1)∗(0+1)^*0(0+1)^*0(0+1)^*?