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 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?
Official PYQ2021Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let ⟨M⟩\langle M \rangle denote an encoding of an automaton MM. Suppose that Σ={0,1}\Sigma = \{0,1\}. Which of the following languages is/are NOT\text{NOT} recursive?
Official PYQ2021DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery. Which of the following statements is/are correct?
Official PYQ2021Operating SystemSystem CallsMSQ · 1 mark
Which of the following standard CC library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux\text{UNIX/Linux} operating system?
Official PYQ2021Operating SystemFile SystemsMSQ · 1 mark
Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory foo\textsf{foo}. Which of the following operations will necessarily require a full scan of foo\textsf{foo} …
Official PYQ2021Engineering MathematicsGraphs: Connectivity, Matching, ColouringNAT · 1 mark
In an undirected connected planar graph GG, there are eight vertices and five faces. The number of edges in GG is _________.
Official PYQ2021AlgorithmsMinimum Spanning TreesNAT · 1 mark
Consider the following undirected graph with edge weights as shown: The number of minimum-weight spanning trees of the graph is ___________.
Official PYQ2021Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsNAT · 1 mark
There are 66 jobs with distinct difficulty levels, and 33 computers with distinct processing speeds. Each job is assigned to a computer such that: The fastest computer gets the toughest job and the slowest computer gets the easiest job. Every computer gets at least one job. The number of ways in which this can be done is ___________.
Official PYQ2021Engineering MathematicsProbability: Random Variables and DistributionsNAT · 1 mark
The lifetime of a component of a certain type is a random variable whose probability density function is exponentially distributed with parameter 22. For a randomly picked component of this type, the probability that its lifetime exceeds the expected lifetime (rounded to 22 decimal places) is ____________.
Official PYQ2021Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityNAT · 1 mark
Consider the following expression.lim⁡x→−32x+22−4x+3\displaystyle \lim_{x\rightarrow-3}\frac{\sqrt{2x+22}-4}{x+3}The value of the above expression (rounded to 2 decimal places) is ___________.
Official PYQ2021Programming and Data StructuresArrays, Stacks and QueuesNAT · 1 mark
Consider the following sequence of operations on an empty stack.push(54);push(52);pop();push(55);push(62);s=pop();\textsf{push}(54);\textsf{push}(52);\textsf{pop}();\textsf{push}(55);\textsf{push}(62);\textsf{s}=\textsf{pop}();Consider the following sequence of operations on an empty queue. …
Official PYQ2021Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 1 mark
Consider a computer system with a byte-addressable primary memory of size 2322^{32} bytes. Assume the computer system has a direct-mapped cache of size 32 KB\text{32 KB} (1 KB\text{1 KB} = 2102^{10} bytes), and each cache block is of size 6464 bytes. The size of the tag field is __________ bits.
Official PYQ2021DatabasesTuple Calculus and SQLNAT · 1 mark
A relation r(A,B)r(A, B) in a relational database has 12001200 tuples. The attribute AA has integer values ranging from 66 to 2020, and the attribute BB has integer values ranging from 11 to 2020. Assume that the attributes AA and BB are independently distributed. The estimated number of tuples in the output of …
Official PYQ2021Digital LogicNumber Representations (Fixed and Floating Point)NAT · 1 mark
Consider the following representation of a number in IEEE 754\text{IEEE 754} single-precision floating point format with a bias of 127127.S:1E:  10000001F:  11110000000000000000000S: 1\quad\quad E:\; 10000001\quad\quad F:\;11110000000000000000000 Here S,  ES, \;E and FF denote the sign, exponent, and fraction components of the floating point representation. The decimal value corresponding to the …