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 PYQ2011Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
Consider a network with five nodes, N1N1 to N5N5, as shown as below. The network uses a Distance Vector Routing protocol. Once the routes have been stabilized, the distance vectors at different nodes are as follows. N1: (0,1,7,8,4)(0, 1, 7, 8, 4) N2: (1,0,6,7,3)(1, 0, 6, 7, 3) N3: (7,6,0,2,6)(7, 6, 0, 2, 6) N4: (8,7,2,0,4)(8, 7, 2, 0, 4) N5: (4,3,6,4,0)(4, 3, 6, 4, 0) Each distance vector …
Official PYQ2011Digital LogicSequential CircuitsMCQ · 1 mark
Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration. If at some instance prior to the occurrence of the clock edge, P,QP, Q and RR have a value 00, 11 and 00 respectively, what shall be the value of PQRPQR after the clock edge?
Official PYQ2011AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
Consider the following recursive C function that takes two arguments. unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r) + foo(n/r, r)); else return 0; } What is the return value of the function foo\text{foo} when it is called as foo(345, 10)\text{foo(345, 10)}?
Official PYQ2011Software Engineering (Historical)MCQ · 1 mark
The following is the comment written for a C function. /* This function computes the roots of a quadratic equation a.x^2 + b.x + c = 0. The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases. (i) When coefficient a is zero irrespective of discriminant (ii) When …
Official PYQ2011DatabasesTuple Calculus and SQLMCQ · 1 mark
Database table by name Loan_Records\text{Loan\_Records} is given below. …
Official PYQ2011Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
A deterministic finite automaton (DFA\text{DFA}) DD with alphabet Σ={a,b}\Sigma = \{a, b\} is given below. Which of the following finite state machines is a valid minimal DFA\text{DFA} which accepts the same languages as DD?
Official PYQ2011Operating SystemI/O SchedulingMCQ · 1 mark
An application loads 100100 libraries at startup. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 1010 ms. Rotational speed of disk is 60006000 rpm. If all 100100 libraries are loaded from random locations on the disk, how long does it take to load all libraries? (The time to transfer data …
Official PYQ2011Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
An 8KB8\text{KB} direct-mapped write-back cache is organized as multiple blocks, each size of 32-bytes32\text{-bytes}. The processor generates 32-bit32\text{-bit} addresses. The cache controller contains the tag information for each cache block comprising of the following. 11 valid bit 11 modified bit As many bits as the minimum needed to identify the …
Official PYQ2011Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Definition of a language LL with alphabet {a}\{a\} is given as following.L={ank∣k>0,  and  n is a positive integer constant}L = \left\{a^{nk} \mid k > 0, \:\: and \:\: n \text{ is a positive integer constant} \right\}What is the minimum number of states needed in a DFA to recognize LL?
Official PYQ2011Engineering MathematicsEigenvalues and Eigenvectors, LU DecompositionMCQ · 1 mark
Consider the matrix as given below. [123047003]\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 7 \\ 0 & 0 & 3\end{bmatrix} Which one of the following options provides the CORRECT values of the eigenvalues of the matrix?
Official PYQ2011Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
Consider an instruction pipeline with four stages (S1, S2, S3 and S4)\text{(S1, S2, S3 and S4)} each with combinational circuit only. The pipeline registers are required between each stage and at the end of the last stage. Delays for the stages and for the pipeline registers are as given in the figure. What is the approximate speed up of the pipeline in steady state under …
Official PYQ2011DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Consider a relational table rr with sufficient number of records, having attributes A1,A2,…,AnA_1, A_2, \dots ,A_n and let 1≤p≤n1 \leq p \leq n. Two queries Q1Q1 and Q2Q2 are given below. Q1:πA1,…,Ap(σAp=c(r))Q1: \pi_{A_1, \dots ,A_p} \left(\sigma_{A_p=c}\left(r\right)\right) where cc is a constant …
Official PYQ2011AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
Four Matrices M1,M2,M3M_1, M_2, M_3 and M4M_4 of dimensions p×q,  q×r,  r×sp \times q, \:\:q \times r, \:\:r \times s and s×ts \times t respectively can be multiplied in several ways with different number of total scalar multiplications. For example when multiplied as ((M1×M2)×(M3×M4))((M_1 \times M_2) \times (M_3 \times M_4)), the total number of scalar multiplications is …
Official PYQ2011AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Which of the given options provides the increasing order of asymptotic complexity of functions f1,f2,f3f_1, f_2, f_3 and f4f_4? f1(n)=2nf_1(n) = 2^n f2(n)=n3/2f_2(n) = n^{3/2} f3(n)=nlog⁡2nf_3(n) = n \log_2 n f4(n)=nlog⁡2nf_4(n) = n^{\log_2 n}
Official PYQ2011Compiler DesignRuntime EnvironmentsMCQ · 1 mark
Consider evaluating the following expression tree on a machine with load-store architecture in which memory can be accessed only through load and store instructions. The variables a,b,c,d,a, b, c, d, and ee are initially stored in memory. The binary operators used in this expression tree can be evaluated by the machine only when operands are in registers. The …
Official PYQ2011Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
A deck of 55 cards (each carrying a distinct number from 11 to 55) is shuffled thoroughly. Two cards are then removed one at a time from the deck. What is the probability that the two cards are selected with the number on the first card being one higher than the number on the second card?
Official PYQ2011Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
Consider a finite sequence of random values X=[x1,x2,…xn]X=[x_1,x_2,\dots x_n]. Let μx\mu_x be the mean and σx\sigma_x be the standard deviation of XX. Let another finite sequence YY of equal length be derived from this as yi=a∗xi+by_i=a*x_i+b, where aa and bb are positive constants. Let μy\mu_y be the mean and σy\sigma_y be the standard deviation of …
Official PYQ2011DatabasesNormal FormsMCQ · 1 mark
Consider a database table T containing two columns X\text{X} and Y\text{Y} each of type integer\text{integer}. After the creation of the table, one record (X=1, Y=1)\text{(X=1, Y=1)} is inserted in the table. Let MX\text{MX} and MY\text{MY} denote the respective maximum values of X\text{X} and Y\text{Y} among all records in the table at any point in …
Official PYQ2011Programming and Data StructuresTreesMCQ · 1 mark
We are given a set of nn distinct elements and an unlabeled binary tree with nn nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?
Official PYQ2011Engineering MathematicsPropositional and First Order LogicMCQ · 1 mark
Which one of the following options is CORRECT given three positive integers x,yx, y and zz, and a predicate P(x)=¬(x=1)∧∀y(∃z(x=y∗z)⇒(y=x)∨(y=1))P\left(x\right) = \neg \left(x=1\right)\wedge \forall y \left(\exists z\left(x=y*z\right) \Rightarrow \left(y=x\right) \vee \left(y=1\right) \right)