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 PYQ2017Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the following expression grammar GG: E→E−T∣TE \rightarrow E-T \mid T T→T+F∣FT \rightarrow T + F \mid F F→(E)∣idF \rightarrow (E) \mid id Which of the following grammars is not left recursive, but is equivalent to GG?
Official PYQ2017Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
For any discrete random variable XX, with probability mass function P(X=j)=pj,pj≥0,j∈{0,…,N}P(X=j)=p_j, p_j \geq 0, j \in \{0, \dots , N \}, and Σj=0N pj=1\Sigma_{j=0}^N \: p_j =1, define the polynomial function gx(z)=Σj=0N pj zjg_x(z) = \Sigma_{j=0}^N \: p_j \: z^j. For a certain discrete random variable YY, there exists a scalar β∈[0,1]\beta \in [0,1] such that …
Official PYQ2017Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
In a two-level cache system, the access times of L1L_1 and L2L_2 caches are 11 and 88 clock cycles, respectively. The miss penalty from the L2L_2 cache to main memory is 1818 clock cycles. The miss rate of L1L_1 cache is twice that of L2L_2. The average memory access time (AMAT) of this cache system is 22 cycles. The miss rates of …
Official PYQ2017Digital LogicMinimization (K-Maps etc.)MCQ · 1 mark
Given f(w,x,y,z)=Σm(0,1,2,3,7,8,10)+Σd(5,6,11,15)f(w, x, y, z) = \Sigma_m(0,1, 2, 3, 7, 8, 10) + \Sigma_d(5, 6, 11, 15); where dd represents the 'don't-care' condition in Karnaugh maps. Which of the following is a minimum product-of-sums (POS) form of f(w,x,y,z)f(w, x, y, z)?
Official PYQ2017Engineering MathematicsConditional Probability and Bayes TheoremMCQ · 1 mark
PP and QQ are considering to apply for a job. The probability that PP applies for the job is 14,\dfrac{1}{4}, the probability that PP applies for the job given that QQ applies for the job is 12,\dfrac{1}{2}, and the probability that QQ applies for the job given that PP applies for the job is 13.\dfrac{1}{3}. Then the probability that …
Official PYQ2017Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsNAT · 1 mark
Let P=[11−12−343−23]P = \begin{bmatrix}1 & 1 & -1 \\2 & -3 & 4 \\3 & -2 & 3\end{bmatrix} and Q=[−1−2−161265105]Q = \begin{bmatrix}-1 & -2 &-1 \\6 & 12 & 6 \\5 & 10 & 5\end{bmatrix} be two matrices. Then the rank of P+QP+Q is ___________ .
Official PYQ2017Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which of the following statements about parser is/are CORRECT? Canonical LR\text{Canonical LR} is more powerful than SLR\text{SLR} SLR\text{SLR} is more powerful than LALR\text{LALR} SLR\text{SLR} is more powerful than Canonical LR\text{Canonical LR}
Official PYQ2017Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
Consider the following statements about the routing protocols. Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) in an IPv4\textsf{IPv4} network. RIP uses distance vector routing RIP packets are sent using UDP OSPF packets are sent using TCP OSPF operation is based on link-state routing Which of the above statements are CORRECT?
Official PYQ2017Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
The representation of the value of a 16-bit16\text{-bit} unsigned integer XX in hexadecimal number system is BCA9\textsf{BCA9}. The representation of the value of XX in octal number system is
Official PYQ2017Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program. #include<stdio.h> #include<string.h> int main() { char* c="GATECSIT2017"; char* p=c; printf("%d", (int)strlen(c+2[p]-6[p]-1)); return 0; } The output of the program is _______
Official PYQ2017AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C function int fun(int n) { int i, j; for(i=1; i<=n; i++) { for (j=1; j<n; j+=i) { printf("%d %d", i, j); } } } Time complexity of funfun in terms of Θ\Theta notation is
Official PYQ2017Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program. #include<stdio.h> int main () { int m=10; int n, n1; n=++m; n1=m++; n--; --n1; n-=n1; printf(“%d”, n); return 0; } The output of the program is ______
Official PYQ2017Engineering MathematicsPartial Orders and LatticesNAT · 1 mark
Consider the set X={a,b,c,d,e}X=\{a, b, c, d, e\} under partial ordering R={(a,a),(a,b),(a,c),(a,d),(a,e),(b,b),(b,c),(b,e),(c,c),(c,e),(d,d),(d,e),(e,e)}R=\{(a,a), (a, b), (a, c), (a, d), (a, e), (b, b), (b, c), (b, e), (c, c), (c, e), (d, d), (d, e), (e, e) \} The Hasse diagram of the partial order (X,R)(X, R) is shown below. The minimum number of ordered pairs that need to be added to RR to make (X,R)(X, R) a lattice is ______
Official PYQ2017Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityMCQ · 1 mark
If f(x)=R sin⁡(πx2)+S,f’(12)=2f(x) = R \: \sin ( \frac{\pi x}{2}) + S, f’\left(\frac{1}{2}\right) = \sqrt{2} and ∫01f(x)dx=2Rπ\int_0^1 f(x) dx = \frac{2R}{\pi}, then the constants RR and SS are
Official PYQ2017Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively. Which of the following statements is/are CORRECT for such a circular queue, so …
Official PYQ2017Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following function implemented in C: void printxy(int x, int y) { int *ptr; x=0; ptr=&x; y=*ptr; *ptr=1; printf(“%d, %d”, x, y); } The output of invoking printxy(1,1)printxy(1,1) is:
Official PYQ2017Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Identify the language generated by the following grammar, where SS is the start variable. S→XYS \rightarrow XY X→aX∣aX \rightarrow aX \mid a Y→aYb∣ϵY \rightarrow aYb \mid \epsilon
Official PYQ2017Operating SystemProcesses and ThreadsMCQ · 1 mark
Which of the following is/are shared by all the threads in a process? Program counter Stack Address space Registers
Official PYQ2017DatabasesIntegrity ConstraintsNAT · 1 mark
Consider the following tables T1T1 and T2.T2. …
Official PYQ2017Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
Consider socket API on a Linux machine that supports connected UDP sockets. A connected UDP socket is a UDP socket on which connect function has already been called. Which of the following statements is/are CORRECT? A connected UDP socket can be used to communicate with multiple peers simultaneously. A process can successfully call connect function again for …