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
Let , where and are languages as defined below: Then is
In quick-sort, for sorting elements, the smallest element is selected as pivot using an time algorithm. What is the worst case time complexity of the quick sort?
What is the maximum height of any AVL-tree with nodes? Assume that the height of a tree with a single node is .
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?
The keys and are inserted into an initially empty hash table of length using open addressing with hash function and linear probing. What is the resultant hash table?
The running time of an algorithm is represented by the following recurrence relation: Which one of the following represents the time complexity of the algorithm?
A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because
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, is a memory location associated with the and is initialized to . Now consider the following statements: The …
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 , it would result in another process making transition immediately. A process in blocked state can make transition E while …
Consider a disk system with cylinders. The requests to access the cylinders occur in following sequence: Assuming that the head is currently at cylinder , what is the time taken to satisfy all requests if it takes to move from one cylinder to adjacent one and shortest seek time first …
Consider a system with types of resources ( units), ( units), ( units), ( 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 , , request the resources as follows if …
Consider a -way set associative cache (initially empty) with total cache blocks. The main memory consists of blocks and the request for memory blocks are in the following order: Which one of the following memory block will NOT be in cache if LRU replacement policy is …
Consider a stage pipeline processor. The number of cycles needed by the four instructions in stages is shown below: …
Given the following state table of an FSM with two states and ,one input and one output. …
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 …
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:
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:
Match all items in Group 1 with the correct options from those given in Group 2. …
Which one of the following is FALSE?
Which one of the following languages over the alphabet is described by the regular expression: ?
