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 PYQ2015Digital LogicBoolean AlgebraMCQ · 1 mark
Given the function F=P′+QRF = P' +QR, where FF is a function in three Boolean variables P,QP, Q and RR and P′=!PP'=!P, consider the following statements. (S1)F=∑(4,5,6)(S1) F = \sum(4, 5, 6) (S2)F=∑(0,1,2,3,7)(S2) F = \sum(0, 1, 2, 3, 7) (S3)F=Π(4,5,6)(S3) F = \Pi (4, 5, 6) (S4)F=Π(0,1,2,3,7)(S4) F = \Pi (0, 1, 2, 3, 7) Which of the following is true?
Official PYQ2015Digital LogicBoolean AlgebraNAT · 1 mark
The total number of prime implicants of the function f(w,x,y,z)=∑(0,2,4,5,6,10)f(w, x, y, z) = \sum (0, 2, 4, 5, 6, 10) is __________
Official PYQ2015AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Let f(n)=nf(n) = n and g(n)=n(1+sin⁡ n)g(n) = n^{(1 + \sin \: n)}, where nn is a positive integer. Which of the following statements is/are correct? f(n)=O(g(n))f(n) = O(g(n)) f(n)=Ω(g(n))f(n) = \Omega(g(n))
Official PYQ2015Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Let RR be a relation on the set of ordered pairs of positive integers such that ((p,q),(r,s))∈R((p,q),(r,s)) \in R if and only if p−s=q−rp-s=q-r. Which one of the following is true about RR?
Official PYQ2015AlgorithmsMinimum Spanning TreesNAT · 1 mark
Let GG be a connected undirected graph of 100100 vertices and 300300 edges. The weight of a minimum spanning tree of GG is 500500. When the weight of each edge of GG is increased by five, the weight of a minimum spanning tree becomes ______.
Official PYQ2015AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following recursive C function. void get(int n) { if (n<1) return; get (n-1); get (n-3); printf("%d", n); } If get(6)get(6) function is being called in main()main() then how many times will the get()get() function be invoked before returning to the main()main()?
Official PYQ2015Computer NetworksFragmentation and IP Addressing, IPv4, CIDRNAT · 1 mark
In the network 200.10.11.144/27200.10.11.144/27, the fourth\text{fourth} octet (in decimal) of the last IP\text{IP} address of the network which can be assigned to a host is _______.
Official PYQ2015Engineering MathematicsProbability: Random Variables and DistributionsNAT · 1 mark
Suppose XiX_i for i=1,2,3i=1, 2, 3 are independent and identically distributed random variables whose probability mass functions are Pr[Xi=0]=Pr[Xi=1]=12 for i=1,2,3Pr[X_i = 0] = Pr[X_i = 1] = \frac{1} {2} \text{ for } i = 1, 2, 3. Define another random variable Y=X1X2⊕X3Y = X_1X_2 \oplus X_3, where ⊕\oplus denotes XOR. Then Pr[Y=0∣X3=0]=Pr[Y=0 \mid X_3 = 0] =______.
Official PYQ2015Computer NetworksPacket, Circuit and Virtual Circuit SwitchingNAT · 1 mark
Two hosts are connected via a packet switch with 10710^7 bits per second links. Each link has a propagation delay of 2020 microseconds. The switch begins forwarding a packet 3535 microseconds after it receives the same. If 1000010000 bits of data are to be transmitted between the two hosts using a packet size of 50005000 bits, the time elapsed between …
Official PYQ2015Digital LogicNumber Representations (Fixed and Floating Point)NAT · 1 mark
Consider the equation (43)x=(y3)8(43)_x = (y3)_8 where xx and yy are unknown. The number of possible solutions is _____
Official PYQ2015Operating SystemCPU SchedulingMCQ · 1 mark
For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time? …
Official PYQ2015Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Which of the following languages are context-free? L1:{ambnanbm∣m,n≥1}L_1: \left\{a^mb^na^nb^m \mid m, n \geq 1\right\} L2:{ambnambn∣m,n≥1}L_2: \left\{a^mb^na^mb^n \mid m, n \geq 1\right\} L3:{ambn∣m=2n+1}L_3: \left\{a^mb^n \mid m = 2n +1 \right\}
Official PYQ2015Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
If the following system has non-trivial solution, px+qy+rz=0px + qy + rz = 0 qx+ry+pz=0qx + ry + pz = 0 rx+py+qz=0rx + py + qz = 0, then which one of the following options is TRUE?
Official PYQ2015Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the following grammar G S→F∣HS \rightarrow F \mid H F→p∣cF \rightarrow p \mid c H→d∣cH \rightarrow d \mid c Where SS, FF, and HH are non-terminal symbols, p,dp, d, and cc are terminal symbols. Which of the following statement(s) is/are correct? S1: LL(1) can parse all strings that are generated using grammar G S2: LR(1) can parse all …
Official PYQ2015Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
Consider the following two C code segments. YY and XX are one and two dimensional arrays of size nn and n×nn \times n respectively, where 2≤n≤102 \leq n \leq 10. Assume that in both code segments, elements of YY are initialized to 00 and each element X[i][j]X[i][j] of array XX is initialized to i+ji+j. Further assume that when stored in main …
Official PYQ2015DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the partial Schedule SS involving two transactions T1T1 and T2T2. Only the read\textit{read} and the write\textit{write} operations have been shown. The read\textit{read} operation on data item PP is denoted by read(P)\textit{read(P)} and write\textit{write} operation on data item PP is denoted by write(P)\textit{write(P)}. …
Official PYQ2015Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsNAT · 1 mark
Consider a network connecting two systems located 80008000 Km\text{Km} apart. The bandwidth of the network is 500×106500 \times 10^6 bits\text{bits} per second. The propagation speed of the media is 4×1064 \times 10^6 meters\text{meters} per second. It needs to design a Go-Back-NN sliding window protocol for this network. The average packet size is 10710^7 …
Official PYQ2015Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program #include<stdio.h> int main() { static int a[] = {10, 20, 30, 40, 50}; static int *p[] = {a, a+3, a+4, a+1, a+2}; int **ptr = p; ptr++; printf("%d%d", ptr-p, **ptr); } The output of the program is _______.
Official PYQ2015AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Assume that a mergesort algorithm in the worst case takes 3030 seconds for an input of size 6464. Which of the following most closely approximates the maximum input size of a problem that can be solved in 66 minutes?
Official PYQ2015Programming and Data StructuresTreesNAT · 1 mark
Consider a binary tree T that has 200200 leaf nodes. Then the number of nodes in T that have exactly two children are ______.