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 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 …
Official PYQ2010Digital LogicCombinational CircuitsMCQ · 1 mark
In the sequential circuit shown below, if the initial value of the output Q1Q0Q_1Q_0 is 0000. What are the next four values of Q1Q0Q_1Q_0?
Official PYQ2010Digital LogicCombinational CircuitsMCQ · 1 mark
What is the boolean expression for the output ff of the combinational logic circuit of NOR gates given below?
Official PYQ2010Operating SystemCPU SchedulingMCQ · 1 mark
Which of the following statements are true? Shortest remaining time first scheduling may cause starvation Preemptive scheduling may cause starvation Round robin is better than FCFS in terms of response time
Official PYQ2010Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A system uses FIFO policy for system replacement. It has 44 page frames with no pages loaded to begin with. The system first accesses 100100 distinct pages in some order and then accesses the same 100100 pages but now in the reverse order. How many page faults will occur?
Official PYQ2010Software Engineering (Historical)MCQ · 1 mark
What is the appropriate pairing of items in the two columns listing various activities encountered in a software life cycle? P. Requirements Capture 1. Module Development and Integration Q. Design 2. Domain Analysis R. Implementation 3. Structural and Behavioral Modeling S. Maintenance 4. Performance Tuning
Official PYQ2010Operating SystemConcurrency and SynchronizationMCQ · 1 mark
Consider the methods used by processes P1P1 and P2P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1S1 and S2S2 are randomly assigned. …
Official PYQ2010Software Engineering (Historical)MCQ · 1 mark
The cyclomatic complexity of each of the modules A\text{A} and B\text{B} shown below is 10.10. What is the cyclomatic complexity of the sequential integration shown on the right hand side?