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 PYQ2010General AptitudeMCQ · 1 mark
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.
Official PYQ2010Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
Consider a network with 66 routers R1\textbf{R1} to R6\textbf{R6} 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 …
Official PYQ2010Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
A hash table of length 1010 uses open addressing with hash function h(k)=kmod  10h(k) = k \mod 10, and linear probing. After inserting 66 values into an empty hash table, the table is shown as below …
Official PYQ2010AlgorithmsMinimum Spanning TreesMCQ · 1 mark
Consider a complete undirected graph with vertex set {0,1,2,3,4}\{0, 1, 2, 3, 4\}. Entry WijW_{ij} in the matrix WW below is the weight of the edge {i,j}\{i, j\} …
Official PYQ2010Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
A computer system has an L1L1 cache, an L2L2 cache, and a main memory unit connected as shown below. The block size in L1L1 cache is 44 words. The block size in L2L2 cache is 1616 words. The memory access times are 22 nanoseconds, 2020 nanoseconds and 200200 nanoseconds for L1L1 cache, L2L2 cache and the main memory unit respectively. …
Official PYQ2010Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
Suppose computers AA and BB have IPIP addresses 10.105.1.11310.105.1.113 and 10.105.1.9110.105.1.91 respectively and they both use same netmask NN. Which of the values of NN given below should not be used if AA and BB should belong to the same network?
Official PYQ2010Operating SystemDeadlockMCQ · 1 mark
A system has nn resources R0,…,Rn−1R_0, \dots,R_{n-1}, and kk processes P0,…,Pk−1P_0, \dots, P_{k-1}. The implementation of the resource request logic of each process PiP_i is as follows: if(i%2==0){\text{if} (i\%2==0) \{ if(i<n) request Ri;\quad\text{if} (i<n) \text{ request } R_i; if(i+2<n) request Ri+2;}\quad\text{if} (i+2 < n) \text{ request } R_{i+2}; \} else{\text{else} \{ …
Official PYQ2010Operating SystemConcurrency and SynchronizationMCQ · 1 mark
The following program consists of 33 concurrent processes and 33 binary semaphores. The semaphores are initialized as S0=1,S1=0S0=1, S1=0 and S2=0.S2=0. …
Official PYQ2010Software Engineering (Historical)MCQ · 1 mark
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 a, b, ca,\:b,\:c and dd. The exact values are not given. T1: a, b, c and d are all equal T2: a, b, c …
Official PYQ2010DatabasesNormal FormsMCQ · 1 mark
The following functional dependencies hold for relations R(A,B,C)R(A, B, C) and S(B,D,E).S(B, D, E). B→AB \to A A→CA \to C The relation RR contains 200200 tuples and the relation SS contains 100100 tuples. What is the maximum number of tuples possible in the natural join R⋈SR \bowtie S?
Official PYQ2010DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following schedule for transactions T1,T2T1, T2 and T3:T3: …
Official PYQ2010Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let ww be any string of length nn in {0,1}∗\{0,1\}^*. Let LL be the set of all substrings of ww. What is the minimum number of states in non-deterministic finite automation that accepts LL?
Official PYQ2010Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the languages L1={0i1j ∣i≠j},L1=\{0^i1^j\ \mid i \neq j\}, L2={0i1j∣i=j},L2=\{0^i1^j\mid i=j\}, L3={0i1j∣i=2j+1},L3=\{0^i1^j \mid i=2j+1\}, L4={0i1j∣i≠2j}L4=\{0^i1^j \mid i\neq2j\}
Official PYQ2010Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let L={w∈ (0+1)∗∣w has even number of 1s}L=\{ w \in \:(0+1)^* \mid w\text{ has even number of }1s \}. i.e., LL is the set of all the bit strings with even numbers of 11s. Which one of the regular expressions below represents LL?
Official PYQ2010Compiler DesignParsing (LL, LR)MCQ · 1 mark
The grammar S→aSa∣bS∣cS \to aSa \mid bS \mid c is
Official PYQ2010Compiler DesignRuntime EnvironmentsMCQ · 1 mark
The program below uses six temporary variables a,b,c,d,e,fa, b, c, d, e, f. 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?
Official PYQ2010Programming and Data StructuresLinked ListsMCQ · 1 mark
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 == …
Official PYQ2010AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
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; }
Official PYQ2010AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
The weight of a sequence a0,a1,…,an−1a_0,a_1, \dots, a_{n-1} of real numbers is defined as a0+a1/2+⋯+an−1/2n−1a_0+a_1/2+ \dots + a_{n-1}/2^{n-1}. A subsequence of a sequence is obtained by deleting some elements from the sequence, keeping the order of the remaining elements the same. Let XX denote the maximum possible weight of a subsequence of ao,a1,…,an−1a_o,a_1, \dots, a_{n-1} and …
Official PYQ2010Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
A 5−5-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 11 clock cycle each for any instruction. The PO stage takes 11 clock cycle for ADD and SUB instructions, 33 clock cycles for MUL instruction and 66 clock …