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 PYQ2021General AptitudeMCQ · 1 mark
​​​​​​The ratio of boys to girls in a class is 77 to 33. Among the options below, an acceptable value for the total number of students in the class is:
Official PYQ2021General AptitudeMCQ · 1 mark
A polygon is convex if, for every pair of points, P\text{P} and Q\text{Q} belonging to the polygon, the line segment PQ\text{PQ} lies completely inside or on the polygon. Which one of the following is NOT‾\underline{\text{NOT}} a convex polygon?
Official PYQ2021General AptitudeMCQ · 1 mark
A circular sheet of paper is folded along the lines in the directions shown. The paper, after being punched in the final folded state as shown and unfolded in the reverse order of folding, will look like _______.
Official PYQ2021General AptitudeMCQ · 1 mark
Consider the following sentences: Everybody in the class is prepared for the exam. Babu invited Danish to his home because he enjoys playing chess. Which of the following is the CORRECT\text{CORRECT} observation about the above two sentences?
Official PYQ2021General AptitudeMCQ · 1 mark
___________ is to surgery as writer is to ___________ Which one of the following options maintains a similar logical relation in the above sentence?
Official PYQ2021General AptitudeMCQ · 2 marks
ItemsCostProfit %Marked Price(₹)(₹)P5,400−−−5,860Q−−−2510,000\begin{array}{|c|c|c|c|} \hline \textbf{Items} & \textbf{Cost} & \textbf{Profit \%} & \textbf{Marked Price} \\ & \text{(₹)} & & \text{(₹)} \\ \hline P &5,400 &---&5,860\\ \hline Q&---&25&10,000\\ \hline\end{array} Details of prices of two items PP and QQ are presented in the above table. The ratio of …
Official PYQ2021General AptitudeMCQ · 2 marks
There are five bags each containing identical sets of ten distinct chocolates. One chocolate is picked from each bag. The probability that at least two chocolates are identical is __________
Official PYQ2021General AptitudeMSQ · 2 marks
Given below are two statements 11 and 22, and two conclusions I\text{I} and II\text{II} Statement 1:\text{Statement 1:} All bacteria are microorganisms. Statement 2:\text{Statement 2:} All pathogens are microorganisms. Conclusion I:\text{Conclusion I:} Some pathogens are bacteria. Conclusion II:\text{Conclusion II:} All pathogens are not bacteria. Based on the above statements and …
Official PYQ2021General AptitudeMCQ · 2 marks
Some people suggest anti-obesity measures (AOM)\text{(AOM)} such as displaying calorie information in restaurant menus. Such measures sidestep addressing the core problems that cause obesity: poverty and income inequality. Which one of the following statements summarizes the passage?
Official PYQ2021Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Suppose that L1L_1 is a regular language and L2L_2 is a context-free language. Which one of the following languages is NOT\text{NOT} necessarily context-free?
Official PYQ2021Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
​​​​​Let PP be an array containing nn integers. Let tt be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of nn elements. Which one of the following choices is correct?
Official PYQ2021AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following three functions. f1=10nf2=nlog⁡nf3=nnf_1=10^n\quad f_2=n^{\log n}\quad f_3=n^{\sqrt {n}} Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
Official PYQ2021Compiler DesignRuntime EnvironmentsMCQ · 1 mark
Consider the following statements. S1:S_1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree. S2:S_2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree. Which one of the following options is correct?
Official PYQ2021Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the following statements. S1:S_1: Every SLR(1)\text{SLR(1)} grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1)\text{SLR(1)}. S2:S_2: For any context-free grammar, there is a parser that takes at most O(n3)O(n^3) time to parse a string of length nn. Which one of the following options is correct?
Official PYQ2021Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
Let the representation of a number in base 33 be 210210. What is the hexadecimal representation of the number?
Official PYQ2021Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
Consider the following two statements. S1S_1: Destination MAC\text{MAC} address of an ARP\text{ARP} reply is a broadcast address. S2S_2: Destination MAC\text{MAC} address of an ARP\text{ARP} request is a broadcast address. Which one of the following choices is correct?
Official PYQ2021Engineering MathematicsPropositional and First Order LogicMCQ · 1 mark
Let pp and qq be two propositions. Consider the following two formulae in propositional logic. S1:(¬p∧(p∨q))→qS_1: (\neg p\wedge(p\vee q))\rightarrow q S2:q→(¬p∧(p∨q))S_2: q\rightarrow(\neg p\wedge(p\vee q)) Which one of the following choices is correct?
Official PYQ2021AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Consider the following array.2332456972738997\begin{array}{|l|l|l|l|l|l|} \hline 23&32&45&69&72&73&89&97 \\ \hline\end{array} Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort the above array in ascending order?
Official PYQ2021Programming and Data StructuresBinary Search TreesMCQ · 1 mark
A binary search tree TT contains nn distinct elements. What is the time complexity of picking an element in TT that is smaller than the maximum element in TT?
Official PYQ2021Operating SystemMemory Management and Virtual MemoryMSQ · 1 mark
In the context of operating systems, which of the following statements is/are correct with respect to paging?