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 PYQ2016Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the following languages: L1={anbmcn+m:m,n≥1}L_{1}=\left\{a^{n}b^{m}c^{n+m}:m, n\geq 1\right\} L2={anbnc2n:n≥1}L_{2}=\left\{a^{n}b^{n}c^{2n} :n\geq 1\right\} Which one of the following is TRUE?
Official PYQ2016Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
A binary relation RR on N×N\mathbb{N} \times \mathbb{N} is defined as follows: (a,b)R(c,d)(a, b) R(c, d) if a≤ca \leq c or b≤db \leq d. Consider the following propositions: P:P: RR is reflexive. Q:Q: RR is transitive. Which one of the following statements is TRUE?
Official PYQ2016Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following program: int f (int * p, int n) { if (n <= 1) return 0; else return max (f (p+1, n-1), p[0] - p[1]); } int main () { int a[] = {3, 5, 2, 6, 4}; printf(" %d", f(a, 5)); } Note: max⁡(x,y)\max (x, y) returns the maximum of xx and yy. The value printed by this program is ________.
Official PYQ2016Computer Organization and ArchitectureMachine Instructions and Addressing ModesNAT · 1 mark
Consider a processor with 6464 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and twelve-bit immediate value. Each instruction must be stored in memory in a byte-aligned fashion. If a program has 100100 instructions, the …
Official PYQ2016Operating SystemConcurrency and SynchronizationMCQ · 1 mark
Consider the following two-process synchronization solution. …
Official PYQ2016Compiler DesignParsing (LL, LR)MCQ · 1 mark
A student wrote two context-free grammars G1 and G2 for generating a single C-like array declaration. The dimension of the array is at least one. For example, int a[10] [3]; The grammars use D as the start symbol, and use six terminal symbols int ; id [ ] num. …
Official PYQ2016Programming and Data StructuresTreesMCQ · 1 mark
Consider the following New-order strategy for traversing a binary tree: Visit the root; Visit the right subtree using New-order; Visit the left subtree using New-order; The New-order traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5 - 2 ^ 6 7 * 1 + - is given by:
Official PYQ2016Theory of ComputationTuring MachinesMCQ · 1 mark
Consider the following languages. L1={⟨M⟩∣M takes at least 2016 steps on some input}L_{1} = \left\{\left\langle M \right\rangle \mid M \text{ takes at least 2016 steps on some input} \right\}, L2={⟨M⟩∣M takes at least 2016 steps on all inputs}L_{2} = \left\{\left\langle M \right\rangle \mid M \text{ takes at least 2016 steps on all inputs} \right\} and L3={⟨M⟩∣M accepts ϵ}L_{3} = \left\{\left\langle M \right\rangle \mid M \ \text{accepts }\epsilon\right\}, where …
Official PYQ2016Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Consider a set UU of 2323 different compounds in a chemistry lab. There is a subset SS of UU of 99 compounds, each of which reacts with exactly 33 compounds of UU. Consider the following statements: Each compound in U \ S reacts with an odd number of compounds. At least one compound in U \ S reacts with an odd number of compounds. Each …
Official PYQ2016Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which one of the following grammars is free from left recursion?
Official PYQ2016Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
For the IEEE 802.11 MAC\text{IEEE 802.11 MAC} protocol for wireless communication, which of the following statements is/are TRUE? At least three non-overlapping channels are available for transmissions. The RTS-CTS mechanism is used for collision detection. Unicast frames are ACKed.
Official PYQ2016Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 1 mark
A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read a block from the cache is 11 ms and to read a block from the disk is 1010 ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 1010 MB. The …
Official PYQ2016Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following two statements: If all states of an NFA are accepting states then the language accepted by the NFA is Σ∗\Sigma_{}^{*}. There exists a regular language AA such that for all languages BB, A∩BA \cap B is regular. Which one of the following is CORRECT?
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following database schedule with two transactions T1T_{1} and T2T_{2}. S=r2(X);r1(X);r2(Y);w1(X);r1(Y);w2(X);a1;a2S= r_{2}\left(X\right); r_{1}\left(X\right); r_{2} \left(Y\right); w_{1} \left(X\right); r_{1} \left(Y\right); w_{2} \left(X\right); a_{1}; a_{2} Where ri(Z)r_{i} (Z) denotes a read operation by transaction TiT_{i} on a variable ZZ, wi(Z)w_{i}(Z) denotes a write …
Official PYQ2016Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingNAT · 1 mark
A network has a data transmission bandwidth of 20×10620 \times 10^{6} bits per second. It uses CSMA/CD in the MAC layer. The maximum signal propagation time from one node to another node is 4040 microseconds. The minimum size of a frame in the network is __________ bytes.
Official PYQ2016Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsNAT · 1 mark
The value of the expression 1399(mod17)13^{99}\pmod{17} in the range 00 to 1616, is ________.
Official PYQ2016AlgorithmsAlgorithm Design: Dynamic ProgrammingNAT · 1 mark
Let A1,A2,A3A_{1}, A_{2}, A_{3} and A4A_{4} be four matrices of dimensions 10×5,5×20,20×1010 \times 5, 5 \times 20, 20 \times 10 and 10×510 \times 5, respectively. The minimum number of scalar multiplications required to find the product A1A2A3A4A_{1}A_{2}A_{3}A_{4} using the basic matrix multiplication method is _________.
Official PYQ2016Programming and Data StructuresBinary Search TreesNAT · 1 mark
The number of ways in which the numbers 1,2,3,4,5,6,71, 2, 3, 4, 5, 6, 7 can be inserted in an empty binary search tree, such that the resulting tree has height 66, is _________. Note: The height of a tree with a single node is 00.
Official PYQ2016Programming and Data StructuresBinary HeapsNAT · 1 mark
A complete binary min-heap is made by including each integer in [1,1023][1, 1023] exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth 00. The maximum depth at which integer 99 can appear is _________.
Official PYQ2016Computer Organization and ArchitectureInstruction PipeliningNAT · 1 mark
Consider a 3 GHz3 \ \text{GHz} (gigahertz) processor with a three stage pipeline and stage latencies τ1,τ2\large\tau_1,\tau_2 and τ3\large\tau_3 such that τ1=3τ24=2τ3\large\tau_1 =\dfrac{3 \tau_2}{4}=2\tau_3. If the longest pipeline stage is split into two pipeline stages of equal latency , the new frequency is __________ GHz\text{GHz}, ignoring delays in the …