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 PYQ2015General AptitudeNAT · 1 mark
If p,q,r,sp, q, r, s are distinct integers such that: f(p,q,r,s)= max (p,q,r,s)f (p, q, r, s) = \text{ max } (p, q, r, s) g(p,q,r,s)= min (p,q,r,s)g (p, q, r, s) = \text{ min } (p, q, r, s) h(p,q,r,s)=remainder of (p×q)(r×s) if (p×q)>(r×s)h (p, q, r, s) = \text{remainder of } \frac{(p \times q)} {(r \times s)} \text{ if } (p \times q) > (r \times s) …
Official PYQ2015General AptitudeMCQ · 1 mark
In a triangle PQR,PSPQR, PS is the angle bisector of ∠QPR and ∠QPS=60∘\angle QPR \text{ and } \angle QPS =60^\circ. What is the length of PSPS ?
Official PYQ2015General AptitudeMCQ · 1 mark
Four branches of a company are located at M, N, O\text{M, N, O} and P. M\text{P. M} is north of N\text{N} at a distance of 4  km; P4\;\text{km; P} is south of O\text{O} at a distance of 2  km; N2\;\text{km; N} is southeast of O\text{O} by 1  km1\;\text{km}. What is the distance between M\text{M} and P\text{P} in km\text{km}?
Official PYQ2015General AptitudeMCQ · 1 mark
If the list of letters PP, RR, SS, TT, UU is an arithmetic sequence, which of the following are also in arithmetic sequence? 2P,2R,2S,2T,2U2P, 2R, 2S, 2T, 2U P−3,R−3,S−3,T−3,U−3P-3, R-3, S-3, T-3, U-3 P2,R2,S2,T2,U2P^2, R^2, S^2, T^2, U^2
Official PYQ2015General AptitudeMCQ · 1 mark
Based on the given statements, select the most appropriate option to solve the given question. What will be the total weight of 1010 poles each of same weight? Statements: One fourth of the weight of the pole is 5  Kg5\;\text{Kg}. The total weight of these poles is 160  Kg160\;\text{Kg} more than the total weight of two poles.
Official PYQ2015General AptitudeMCQ · 1 mark
A generic term that includes various items of clothing such as a skirt, a pair of trousers and a shirt is
Official PYQ2015Engineering MathematicsMaxima and Minima, Mean Value Theorem, IntegrationMCQ · 1 mark
Consider a function f(x)=1−∣x∣ on −1≤x≤1f(x) = 1- |x| \text{ on } -1 \leq x \leq 1. The value of xx at which the function attains a maximum, and the maximum value of the function are:
Official PYQ2015General AptitudeMCQ · 1 mark
Choose the statement where underlined word is used correctly.
Official PYQ2015General AptitudeMCQ · 1 mark
We __________ our friends's birthday and we _________ how to make it up to him.
Official PYQ2015Software Engineering (Historical)MCQ · 1 mark
Consider the following software items: Program-XX, Control Flow Diagram of Program-YY and Control Flow Diagram of Program-ZZ as shown below The values of McCabe's Cyclomatic complexity of program-XX, program-YY, and program-ZZ respectively are
Official PYQ2015Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program: #include<stdio.h> int f1(void); int f2(void); int f3(void); int x=10; int main() { int x=1; x += f1() + f2 () + f3() + f2(); printf("%d", x); return 0; } int f1() { int x = 25; x++; return x;} int f2() { static int x = 50; x++; return x;} int f3() { x *= 10; return x;} The output of the program is ______.
Official PYQ2015Theory of ComputationUndecidabilityMCQ · 1 mark
Language L1L_1 is polynomial time reducible to language L2L_2. Language L3L_3 is polynomial time reducible to language L2L_2, which in turn polynomial time reducible to language L4L_4. Which of the following is/are true?  if L4∈P, then L2∈P\text{ if } L_4 \in P, \text{ then } L_2 \in P  if L1∈P or L3∈P, then L2∈P\text{ if } L_1 \in P\text{ or } L_3 \in P, \text{ then } L_2 \in P …
Official PYQ2015Operating SystemDeadlockMCQ · 1 mark
Consider the following policies for preventing deadlock in a system with mutually exclusive resources. Process should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are released. The resources are numbered uniquely, and processes are allowed to request for resources only in …
Official PYQ2015Computer Organization and ArchitectureInstruction PipeliningNAT · 1 mark
Consider the following reservation table for a pipeline having three stages S1,S2 and S3S_1, S_2 \text{ and } S_3. …
Official PYQ2015Numerical Methods (Historical)NAT · 1 mark
The velocity vv (in kilometer/minute) of a motorbike which starts form rest, is given at fixed intervals of time tt (in minutes) as follows: t2468101214161820 v10182529322011520 The approximate distance (in kilometers) rounded to two places of decimals covered in 20 minutes using Simpson's 1/3rd1/3^{rd} rule is ________.
Official PYQ2015AlgorithmsAsymptotic Worst Case Time and Space ComplexityNAT · 1 mark
Suppose c=⟨c[0],…,c[k−1]⟩c = \langle c[0], \dots, c[k-1]\rangle is an array of length kk, where all the entries are from the set {0,1}\{0, 1\}. For any positive integers a and na \text{ and } n, consider the following pseudocode. DOSOMETHING (c, a, n) z ← 1 for i ← 0 to k-1 do z ← z² mod n if c[i]=1 then z ← (z × a) mod n return z If …
Official PYQ2015Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program: #include<stdio.h> int main() { int i, j, k = 0; j=2 * 3 / 4 + 2.0 / 5 + 8 / 5; k-=--j; for (i=0; i<5; i++) { switch(i+k) { case 1: case 2: printf("\n%d", i+k); case 3: printf("\n%d", i+k); default: printf("\n%d", i+k); } } return 0; } The number of times printf statement is executed is _______.
Official PYQ2015Computer Organization and ArchitecturePipeline HazardsMCQ · 1 mark
Consider the following code sequence having five instructions from I1 to I5I_1 \text{ to } I_5. Each of these instructions has the following format. OP Ri, Rj, Rk Where operation OP is performed on contents of registers Rj and Rk and the result is stored in register Ri. I1I_1: ADD R1, R2, R3 I2I_2: MUL R7, R1, R3 I3I_3: SUB R4, R1, R5 I4I_4: ADD R3, R2, …
Official PYQ2015DatabasesFile Organization and Indexing (B and B+ Trees)NAT · 1 mark
Consider a B+B^+ tree in which the search key is 1212 bytes\text{bytes} long, block size is 10241024 bytes\text{bytes}, record pointer is 1010 bytes\text{bytes} long and the block pointer is 88 bytes\text{bytes} long. The maximum number of keys that can be accommodated in each non-leaf node of the tree is ______.
Official PYQ2015Engineering MathematicsMaxima and Minima, Mean Value Theorem, IntegrationMCQ · 1 mark
If for non-zero x, af(x)+bf(1x)=1x−25x, \: af(x) + bf(\frac{1}{x}) = \frac{1}{x} - 25 where a≠b then ∫12f(x)dxa \neq b \text{ then } \int\limits_1^2 f(x)dx is