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 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_________________.
Official PYQ2015Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
For a set AA, the power set of AA is denoted by 2A2^{A}. If A={5,{6},{7}}A = \left\{5,\left\{6\right\}, \left\{7\right\}\right\}, which of the following options are TRUE? ∅∈2A\varnothing \in 2^{A} ∅⊆2A\varnothing \subseteq 2^{A} {5,{6}}∈2A\left\{5,\left\{6\right\}\right\} \in 2^{A} {5,{6}}⊆2A\left\{5,\left\{6\right\}\right\} \subseteq 2^{A}
Official PYQ2015Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
The binary operator ≠\neq is defined by the following truth table. …
Official PYQ2015Operating SystemI/O SchedulingNAT · 1 mark
Suppose the following disk request sequence (track numbers) for a disk with 100100 tracks is given: 45,20,90,10,50,60,80,25,70.45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 5050. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN …
Official PYQ2015DatabasesTuple Calculus and SQLNAT · 1 mark
Consider the following relation: …
Official PYQ2015Programming and Data StructuresTreesMCQ · 1 mark
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 55 are
Official PYQ2015Programming and Data StructuresBinary Search TreesMCQ · 1 mark
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
Official PYQ2015DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
A file is organized so that the ordering of the data records is the same as or close to the ordering of data entries in some index. Then that index is called
Official PYQ2015Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
Which of the following fields of an IP header is NOT modified by a typical IP router?
Official PYQ2015Digital LogicSequential CircuitsMCQ · 1 mark
Consider a 44-bit Johnson counter with an initial value of 0000.0000. The counting sequence of this counter is
Official PYQ2015Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection? If the sequence number of a segment is m,m, then the sequence number of the subsequent segment is always m+1.m+1. If the estimated round trip time at any given point of time is tt sec, the value of the …
Official PYQ2015Computer NetworksApplication Layer Protocols: DNS, SMTP, HTTP, FTP, EmailMCQ · 1 mark
In one of the pairs of protocols given below , both the protocols can use multiple TCP\textsf{TCP} connections between the same client and the server. Which one is that?