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 ComputationUndecidabilityMCQ · 1 mark
Let XX be a recursive language and YY be a recursively enumerable but not recursive language. Let WW and ZZ be two languages such that Y‾\overline{Y} reduces to WW, and ZZ reduces to X‾\overline{X} (reduction means the standard many-one reduction). Which one of the following statements is TRUE?
Official PYQ2016Operating SystemConcurrency and SynchronizationMCQ · 1 mark
Consider the following proposed solution for the critical section problem. There are nn processes : P0....Pn−1P_0....P_{n-1}. In the code, function pmax\text{pmax} returns an integer not smaller than any of its arguments .For all i,t[i]i,t[i] is initialized to zero. Code for PiP_i; do { c[i]=1; t[i]= pmax (t[0],....,t[n-1])+1; c[i]=0; for every j != i in …
Official PYQ2016Engineering MathematicsSets, Relations and FunctionsNAT · 1 mark
A function f:N+→N+f: \Bbb{N^+} \rightarrow \Bbb{N^+} , defined on the set of positive integers N+\Bbb{N^+}, satisfies the following properties: f(n)=f(n/2)f(n)=f(n/2) if nn is even f(n)=f(n+5)f(n)=f(n+5) if nn is odd Let R={i∣∃j:f(j)=i}R=\{ i \mid \exists{j} : f(j)=i \} be the set of distinct values that ff takes. The maximum possible size of RR is ___________.
Official PYQ2016Operating SystemI/O SchedulingNAT · 1 mark
Cylinder a disk queue with requests for I/OI/O to blocks on cylinders 47,38,121,191,87,11,92,10.47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 6363, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 00 to 199199. The total head movement (in number of cylinders) …
Official PYQ2016Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsNAT · 1 mark
Consider the recurrence relation a1=8,an=6n2+2n+an−1a_1 =8 , a_n =6n^2 +2n+a_{n-1}. Let a99=K×104a_{99}=K\times 10^4. The value of KK is __________.
Official PYQ2016Computer NetworksFragmentation and IP Addressing, IPv4, CIDRNAT · 1 mark
An IP datagram of size 10001000 bytes \text{bytes }arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is 100100 bytes \text{bytes }. Assume that the size of the IP header is 2020 bytes .\text{bytes }. The number of fragments that the IP datagram will be divided into for transmission is________.
Official PYQ2016Operating SystemMemory Management and Virtual MemoryNAT · 1 mark
Consider a computer system with ten physical page frames. The system is provided with an access sequence (a1,a2,....,a20,a1,a2,...a20)(a_{1}, a_{2},....,a_{20}, a_{1}, a_{2},...a_{20}), where each aia_{i} is a distinct virtual page number. The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy …
Official PYQ2016Engineering MathematicsProbability: Random Variables and DistributionsNAT · 1 mark
Consider the following experiment. Step 1. Flip a fair coin twice. Step 2. If the outcomes are (TAILS, HEADS) then output YY and stop. Step 3. If the outcomes are either (HEADS, HEADS) or (HEADS, TAILS), then output NN and stop. Step 4. If the outcomes are (TAILS, TAILS), then go to Step 1.1. The probability that the output of the experiment is YY …
Official PYQ2016Programming and Data StructuresBinary HeapsMCQ · 1 mark
An operator delete(i)(i) for a binary heap data structure is to be designed to delete the item in the ii-th node. Assume that the heap is implemented in an array and ii refers to the ii-th index of the array. If the heap tree has depth dd (number of edges on the path from the root to the farthest leaf ), then what is the time complexity to …
Official PYQ2016Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the following context-free grammars; G1:S→aS∣B,B→b∣bBG_1 : S \to aS \mid B, B \to b \mid bB G2:S→aA∣bB,A→aA∣B∣ε,B→bB∣εG_2 : S \to aA \mid bB, A \to aA \mid B \mid \varepsilon,B \to bB \mid \varepsilon Which one of the following pairs of languages is generated by G1G_1 and G2G_2 ,respectively?
Official PYQ2016Programming and Data StructuresProgramming in CMCQ · 1 mark
The following function computes the maximum value contained in an integer array P[ ]P[ \ ] of size nn (n>=1)(n>=1). int max (int *p,int n) { int a = 0, b=n-1; while (__________) { if (p[a]<= p[b]) {a = a+1;} else {b = b-1;} } return p[a]; } The missing loop condition is:
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following two phase locking protocol. Suppose a transaction TT accesses (for read or write operations), a certain set of objects {O1,…,Ok}\{O_1,\ldots,O_k \}. This is done in the following manner: Step 1\text{Step 1}. TT acquires exclusive locks to O1,…,OkO_1,\ldots,O_k in increasing order of their addresses. Step 2\text{Step 2}. The required …
Official PYQ2016Compiler DesignRuntime EnvironmentsMCQ · 1 mark
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed? a = 3; void n(x) { x = x * a; print (x); } void m(y) { a = 1 ; a = y - a; n(a); print (a); } void main () { m(a); }
Official PYQ2016Compiler DesignSyntax-directed TranslationMCQ · 1 mark
Consider the following Syntax Directed Translation Scheme (SDTS)( SDTS ), with non-terminals {S,A}\{S,A \} and terminals {a,b}\{a,b \}. S→aA{print 1}S \to aA \quad \{\text{print }1\} S→a{print 2}S \to a \quad \{\text{print }2\} A→Sb{print 3}A \to Sb \quad \{\text{print }3\} Using the above SDTSSDTS , the output printed by a bottom-up parser, for the input aabaab is:
Official PYQ2016Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeNAT · 1 mark
The size of the data count register of a DMA\text{DMA} controller is 16  bits16\;\text{bits}. The processor needs to transfer a file of 29,15429,154 kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the DMA\text{DMA} controller needs to get the control of the system bus from the processor to transfer the file from …
Official PYQ2016Compiler DesignParsing (LL, LR)NAT · 1 mark
The attribute of three arithmetic operators in some programming language are given below. …
Official PYQ2016Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsNAT · 1 mark
A sender uses the Stop-and-Wait ARQ\text{ARQ} protocol for reliable transmission of frames. Frames are of size 10001000 bytes and the transmission rate at the sender is 80  Kbps(1Kbps=1000   bits/second).80\;\textsf{Kbps} (1\textsf{Kbps} = 1000\;\text{ bits/second}). Size of an acknowledgment is 100100 bytes and the transmission rate at the receiver is 8  Kbps.8\;\textsf{Kbps.} The one-way …
Official PYQ2016Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
Consider that BB wants to send a message mm that is digitally signed to AA. Let the pair of private and public keys for AA and BB be denoted by Kx−{K_{x}}^- and Kx+{K_{x}}^+ for x=A,Bx=A, B, respectively. Let Kx(m)K_{x}(m) represent the operation of encrypting mm with a key KxK_{x} and H(m)H(m) represent the message digest. Which one of …
Official PYQ2016Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsNAT · 1 mark
The coefficient of x12x^{12} in (x3+x4+x5+x6+… )3\left(x^{3}+x^{4}+x^{5}+x^{6}+\dots \right)^{3} is ___________.
Official PYQ2016Computer Organization and ArchitectureInstruction PipeliningNAT · 1 mark
The stage delays in a 44-stage pipeline are 800,500,400800, 500, 400 and 300300 picoseconds. The first stage (with delay 800800 picoseconds) is replaced with a functionality equivalent design involving two stages with respective delays 600600 and 350350 picoseconds. The throughput increase of the pipeline is ___________ percent.