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 PYQ2019Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityMCQ · 1 mark
Compute lim⁡x→3x4−812x2−5x−3\displaystyle \lim_{x \rightarrow 3} \frac{x^4-81}{2x^2-5x-3}
Official PYQ2019DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following two statements about database transaction schedules: Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable Which of the above statements …
Official PYQ2019Engineering MathematicsGraphs: Connectivity, Matching, ColouringMSQ · 1 mark
Let GG be an undirected complete graph on nn vertices, where n>2n > 2. Then, the number of different Hamiltonian cycles in GG is equal to
Official PYQ2019DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Which one of the following statements is NOT correct about the B+B^+ tree data structure used for creating an index of a relational database table?
Official PYQ2019Computer NetworksApplication Layer Protocols: DNS, SMTP, HTTP, FTP, EmailMCQ · 1 mark
Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)?
Official PYQ2019Theory of ComputationPumping LemmaMCQ · 1 mark
For Σ={a,b}\Sigma = \{a ,b \}, let us consider the regular language L={x∣x=a2+3k or x=b10+12k,k≥0}L=\{x \mid x = a^{2+3k} \text{ or } x=b^{10+12k}, k \geq 0\}. Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for LL ?
Official PYQ2019Operating SystemSystem CallsNAT · 1 mark
The following C program is executed on a Unix/Linux system : #include<unistd.h> int main() { int i; for(i=0; i<10; i++) if(i%2 == 0) fork(); return 0; } The total number of child processes created is ________________ .
Official PYQ2019Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program : #include<stdio.h> int jumble(int x, int y){ x = 2*x+y; return x; } int main(){ int x=2, y=5; y=jumble(y,x); x=jumble(y,x); printf("%d \n",x); return 0; } The value printed by the program is ______________.
Official PYQ2019AlgorithmsSearching, Sorting, HashingNAT · 1 mark
An array of 2525 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 22 decimal places) is ________
Official PYQ2019Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsNAT · 1 mark
The value of 351 mod 53^{51} \text{ mod } 5 is _____
Official PYQ2019Digital LogicNumber Representations (Fixed and Floating Point)NAT · 1 mark
Two numbers are chosen independently and uniformly at random from the set {1,2,…,13}.\{1,2,\ldots,13\}. The probability (rounded off to 33 decimal places) that their 4-bit4\text{-bit} (unsigned) binary representations have the same most significant bit is ___________.
Official PYQ2019Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program: #include <stdio.h> int main() { int arr[]={1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip=arr+4; printf(“%d\n”, ip[1]); return 0; } The number that will be displayed on execution of the program is _______
Official PYQ2019Operating SystemConcurrency and SynchronizationNAT · 1 mark
Consider three concurrent processes P1,P2P_1, P_2 and P3P_3 as shown below, which access a shared variable DD that has been initialized to 100.100. P1P2P3::::::D=D+20D=D−50D=D+10::::::\begin{array}{|c|c|c|} \hline P_1 & P_2 & P_3 \\ \hline : & : & : \\ : & : & : \\ D=D+20 & D=D-50 & D=D+10 \\ : & : & : \\ : & : & : \\ \hline \end{array} …
Official PYQ2019AlgorithmsAlgorithm Design: Greedy TechniquesNAT · 1 mark
Consider a sequence of 1414 elements: A=[−5,−10,6,3,−1,−2,13,4,−9,−1,4,12,−3,0]A=[-5, -10, 6, 3, -1, -2, 13, 4, -9, -1, 4, 12, -3, 0]. The sequence sum S(i,j)=Σk=ijA[k]S(i,j) = \Sigma_{k=i}^j A[k]. Determine the maximum of S(i,j)S(i,j), where 0≤i≤j<140 \leq i \leq j <14. (Divide and conquer approach may be used.) Answer: ___________
Official PYQ2019AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 2 marks
Consider the following C function. void convert (int n ) { if (n<0) printf{“%d”, n); else { convert(n/2); printf(“%d”, n%2); } } Which one of the following will happen when the function convert is called with any positive integer nn as argument?
Official PYQ2019Programming and Data StructuresProgramming in CMCQ · 2 marks
Consider the following C program: #include <stdio.h> int r() { static int num=7; return num--; } int main() { for (r();r();r()) printf(“%d”,r()); return 0; } Which one of the following values will be displayed on execution of the programs?
Official PYQ2019Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 2 marks
Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5100.10.5.2, \: 100.10.5.5, and 100.10.5.6100.10.5.6 respectively. The subnet mask is set to 255.255.255.252255.255.255.252 for all the three machines. Which one of the following is true?
Official PYQ2019Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 2 marks
Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?
Official PYQ2019Digital LogicBoolean AlgebraMCQ · 2 marks
Consider three 44-variable functions f1,f2f_1, f_2, and f3f_3, which are expressed in sum-of-minterms as f1=Σ(0,2,5,8,14),f_1=\Sigma(0,2,5,8,14), f2=Σ(2,3,6,8,14,15),f_2=\Sigma(2,3,6,8,14,15), f3=Σ(2,7,11,14)f_3=\Sigma (2,7,11,14) For the following circuit with one AND gate and one XOR gate the output function ff can be expressed as:
Official PYQ2019Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 2 marks
Which one of the following languages over Σ={a,b}\Sigma=\{a, b\} is NOT context-free?