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
Choose the most appropriate word from the options given below to complete the following sentence: His rather casual remarks on politics ________ his lack of seriousness about the subject.
Consider a network with routers to connected with links having weights as shown in the following diagram. All the routers use the distance vector based routing algorithm to update their routing tables. Each router starts with its routing table initialized to contain an entry for each neighbor with the weight of the …
A hash table of length uses open addressing with hash function , and linear probing. After inserting values into an empty hash table, the table is shown as below …
Consider a complete undirected graph with vertex set . Entry in the matrix below is the weight of the edge …
A computer system has an cache, an cache, and a main memory unit connected as shown below. The block size in cache is words. The block size in cache is words. The memory access times are nanoseconds, nanoseconds and nanoseconds for cache, cache and the main memory unit respectively. …
Suppose computers and have addresses and respectively and they both use same netmask . Which of the values of given below should not be used if and should belong to the same network?
A system has resources , and processes . The implementation of the resource request logic of each process is as follows: …
The following program consists of concurrent processes and binary semaphores. The semaphores are initialized as and …
The following program is to be tested for statement coverage: begin if (a==b) {S1; exit;} else if (c==d) {S2;} else {S3; exit;} S4; end The test cases T1, T2, T3 and T4 given below are expressed in terms of the properties satisfied by the values of variables and . The exact values are not given. T1: a, b, c and d are all equal T2: a, b, c …
The following functional dependencies hold for relations and The relation contains tuples and the relation contains tuples. What is the maximum number of tuples possible in the natural join ?
Consider the following schedule for transactions and …
Let be any string of length in . Let be the set of all substrings of . What is the minimum number of states in non-deterministic finite automation that accepts ?
Consider the languages
Let . i.e., is the set of all the bit strings with even numbers of s. Which one of the regular expressions below represents ?
The grammar is
The program below uses six temporary variables . a = 1 b = 10 c = 20 d = a + b e = c + d f = c + e b = c + e e = b + f d = 5 + e return d + f Assuming that all operations take their operands from registers, what is the minimum number of registers needed to execute this program without spilling?
The following C function takes a singly-linked list as input argument. It modifies the list by moving the last element to the front of the list and returns the modified list. Some part of the code is left blank. typedef struct node { int value; struct node *next; } Node; Node *move_to-front(Node *head) { Node *p, *q; if ((head == NULL) || (head -> next == …
What is the value printed by the following C program? #include<stdio.h> int f(int *a, int n) { if (n <= 0) return 0; else if (*a % 2 == 0) return *a+f(a+1, n-1); else return *a - f(a+1, n-1); } int main() { int a[] = {12, 7, 13, 4, 11, 6}; printf("%d", f(a, 6)); return 0; }
The weight of a sequence of real numbers is defined as . A subsequence of a sequence is obtained by deleting some elements from the sequence, keeping the order of the remaining elements the same. Let denote the maximum possible weight of a subsequence of and …
A stage pipelined processor has Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Write Operand (WO) stages. The IF, ID, OF and WO stages take clock cycle each for any instruction. The PO stage takes clock cycle for ADD and SUB instructions, clock cycles for MUL instruction and clock …
