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 PYQ2015AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Let G=(V,E)G = (V, E) be a simple undirected graph, and ss be a particular vertex in it called the source. For x∈Vx \in V, let d(x)d(x) denote the shortest distance in GG from ss to xx. A breadth first search (BFS) is performed starting at ss. Let TT be the resultant BFS tree. If (u,v)(u, v) is an edge of GG that is not in TT, then which …
Official PYQ2015Operating SystemCPU SchedulingNAT · 1 mark
Consider a uniprocessor system executing three tasks T1,T2T_{1}, T_{2} and T3T_{3} each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3,73, 7 and 2020 milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of …
Official PYQ2015Engineering MathematicsMaxima and Minima, Mean Value Theorem, IntegrationNAT · 1 mark
Compute the value of: ∫1π2πcos⁡(1/x)x2dx\large \int \limits_{\frac{1}{\pi}}^{\frac{2}{\pi}}\frac{\cos(1/x)}{x^{2}}dx
Official PYQ2015DatabasesER-modelNAT · 1 mark
Consider an Entity-Relationship (ER)(\text{ER}) model in which entity sets E1E_{1} and E2E_{2} are connected by an m:nm:n relationship R12R_{12}. E1E_{1} and E3E_{3} are connected by a 1:n1 : n (11 on the side of E1E_{1} and nn on the side of E3E_{3}) relationship R13R_{13}. E1E_{1} has two-singled attributes a11a_{11} and a12a_{12} …
Official PYQ2015AlgorithmsMinimum Spanning TreesNAT · 1 mark
The graph shown below has 88 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 3636 and contains the edges: {(A,C),(B,C),(B,E),(E,F),(D,F)}\{(A, C), (B, C), (B, E), (E, F), (D, F)\}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 88 edges of this …
Official PYQ2015Software Engineering (Historical)NAT · 1 mark
Consider the following C program segment. while (first <= last) { if (array[middle] < search) first = middle + 1; else if (array[middle] == search) found = TRUE; else last = middle - 1; middle = (first + last)/2; } if (first > last) notpresent = TRUE; The cyclomatic complexity of the program segment is_______________.
Official PYQ2015AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
An algorithm performs (log⁡N)12(\log N)^{\frac{1}{2}} find operations , NN insert operations, (log⁡N)12(\log N)^{\frac{1}{2}} delete operations, and (log⁡N)12(\log N)^{\frac{1}{2}} decrease-key operations on a set of data items with keys drawn from a linearly ordered set . For a delete operation, a pointer is provided to the record that must be deleted . For the …
Official PYQ2015Digital LogicBoolean AlgebraMCQ · 1 mark
Consider the operations f (X, Y, Z) = X’YZ + XY’ + Y’Z’\textit{f (X, Y, Z) = X'YZ + XY' + Y'Z'} and g (X, Y, Z) = X’YZ + X’YZ’ + XY\textit{g (X, Y, Z) = X'YZ + X'YZ' + XY} Which one of the following is correct?
Official PYQ2015Computer Organization and ArchitectureInstruction PipeliningNAT · 1 mark
Consider a non-pipelined processor with a clock rate of 2.52.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 22 gigahertz. Assume that there are no stalls in the pipeline. The speedup achieved in this …
Official PYQ2015Digital LogicSequential CircuitsMCQ · 1 mark
A positive edge-triggered DD flip-flop is connected to a positive edge-triggered JKJK flip-flop as follows. The QQ output of the DD flip-flop is connected to both the JJ and KK inputs of the JKJK flip-flop, while the QQ output of the JKJK flip-flop is connected to the input of the DD flip-flop. Initially, the output of the DD …
Official PYQ2015Engineering MathematicsEigenvalues and Eigenvectors, LU DecompositionMCQ · 1 mark
Consider the following 2×22 \times 2 matrix AA where two elements are unknown and are marked by aa and bb. The eigenvalues of this matrix are −1-1 and 7.7. What are the values of aa and bb? A=(14ba)\qquad A = \begin{pmatrix}1 & 4\\ b&a \end{pmatrix}
Official PYQ2015Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
What is the output of the following C code? Assume that the address of xx is 20002000 (in decimal) and an integer requires four bytes of memory. int main () { unsigned int x [4] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf ("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3); }
Official PYQ2015Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following pseudo code, where xx and yy are positive integers. begin q := 0 r := x while r ≥ y do begin r := r - y q := q + 1 end end The post condition that needs to be satisfied after the program terminates is
Official PYQ2015Engineering MathematicsPartial Orders and LatticesMCQ · 1 mark
Suppose L={p,q,r,s,t}L = \left\{ p, q, r, s, t\right\} is a lattice represented by the following Hasse diagram: For any x,y∈Lx, y \in L, not necessarily distinct , x∨yx \vee y and x∧yx \wedge y are join and meet of x,yx, y, respectively. Let L3={(x,y,z):x,y,z∈L}L^3 = \left\{\left(x, y, z\right): x, y, z \in L\right\} be the set of all ordered triplets of the elements of LL. Let …
Official PYQ2015Programming and Data StructuresBinary HeapsMCQ · 1 mark
Consider a max heap, represented by the array: 40,30,20,10,15,16,17,8,440, 30, 20, 10, 15, 16, 17, 8, 4. …
Official PYQ2015AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C function. int fun1 (int n) { int i, j, k, p, q = 0; for (i = 1; i < n; ++i) { p = 0; for (j = n; j > 1; j = j/2) ++p; for (k = 1; k < p; k = k * 2) ++q; } return q; } Which one of the following most closely approximates the return value of the function fun1\text{fun1}?
Official PYQ2015Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsNAT · 1 mark
∑x=1991x(x+1)\sum\limits_{x=1}^{99}\frac{1}{x(x+1)} = ______.
Official PYQ2015Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
Suppose that everyone in a group on NN people wants to communicate secretly with the (N - 1)(\text{N - 1}) others using symmetric Key cryptographic system. The communication between any two person should not be decodable by the others in the group. The numbers of keys required in the system as a whole to satisfy the confidentiality requirement is
Official PYQ2015Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingNAT · 1 mark
Consider a LAN with four nodes S1,S2,S3,S_1, S_2, S_3, and S4S_4. Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmits in the same slot. The probabilities of generation of a frame in a time slot by S1,S2,S3,S_1, S_2, S_3, and S4S_4 are …
Official PYQ2015Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsNAT · 1 mark
In the LU decomposition of the matrix [2249]\begin{bmatrix}2 & 2 \\ 4 & 9\end{bmatrix}, if the diagonal elements of UU are both 11, then the lower diagonal entry l22l_{22} of LL is_________________.