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 PYQ2017General AptitudeMCQ · 1 mark
After Rajendra Chola returned from his voyage to Indonesia, he ________ to visit the temple in Thanjavur.
Official PYQ2017Computer Organization and ArchitectureMachine Instructions and Addressing ModesNAT · 1 mark
Consider a RISC machine where each instruction is exactly 44 bytes long. Conditional and unconditional branch instructions use PC-relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further the Offset is always with respect to the address of the next instruction in the program sequence. Consider the …
Official PYQ2017AlgorithmsSearching, Sorting, HashingNAT · 1 mark
Let AA be an array of 3131 numbers consisting of a sequence of 00's followed by a sequence of 11's. The problem is to find the smallest index ii such that A[i]A\left [i \right ] is 11 by probing the minimum number of locations in AA. The worst case number of probes performed by an optimal algorithm is ____________.
Official PYQ2017Engineering MathematicsSets, Relations and FunctionsNAT · 1 mark
The number of integers between 11 and 500500 (both inclusive) that are divisible by 33 or 55 or 77 is ____________ .
Official PYQ2017DatabasesRelational Model: Relational AlgebraNAT · 1 mark
Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below. …
Official PYQ2017Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsNAT · 1 mark
The values of parameters for the Stop-and-Wait ARQ protocol are as given below: Bit rate of the transmission channel =1= 1 Mbps. Propagation delay from sender to receiver =0.75= 0.75 ms. Time to process a frame =0.25= 0.25 ms. Number of bytes in the information frame =1980= 1980. Number of bytes in the acknowledge frame =20= 20. Number of overhead bytes in …
Official PYQ2017Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksNAT · 1 mark
In a RSA cryptosystem, a participant AA uses two prime numbers p=13p = 13 and q=17q = 17 to generate her public and private keys. If the public key of AA is 3535, then the private key of AA is __________ .
Official PYQ2017Compiler DesignParsing (LL, LR)NAT · 1 mark
Consider the following grammar: stmt →\rightarrow if expr then expr else expr; stmt | OˋÒ expr →\rightarrow term relop term | term term →\rightarrow id | number id →\rightarrow a | b | c number →[0−9]\rightarrow [0-9] where relop is a relational operator ((e.g., <,>,…),< , >,\ldots), OˋÒ refers to the empty statement, and if, then, else …
Official PYQ2017DatabasesTransactions and Concurrency ControlMCQ · 1 mark
In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let TS(T1)TS(T_{1}) and TS(T2)TS(T_{2}) be the timestamps of transactions T1T_{1} and T2T_{2} respectively. Besides, T1T_{1} holds a lock on the resource R,R, and T2T_{2} has requested a conflicting lock on the same resource R.R. The following …
Official PYQ2017DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus. {tt | ∃\existsu ∈\in EMP(t[EmpName] = u[EmpName] ∧\wedge ∀\forallv ∈\in …
Official PYQ2017Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
Recall that Belady's anomaly is that the page-fault rate may increase as the number of allocated frames increases. Now, consider the following statements: S1S_1: Random page replacement algorithm (where a page chosen at random is replaced) suffers from Belady's anomaly. S2S_2: LRU page replacement algorithm suffers from Belady's anomaly. Which of the …
Official PYQ2017Theory of ComputationUndecidabilityMCQ · 1 mark
Let AA and BB be finite alphabets and let #\# be a symbol outside both AA and BB. Let ff be a total function from A∗A^{*} to B∗B^{*}. We say ff is computable if there exists a Turing machine MM which given an input x∈A∗x \in A^{*}, always halts with f(x)f(x) on its tape. Let LfL_{f} denote the language …
Official PYQ2017Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the following languages over the alphabet Σ={a,b,c}\Sigma = \left \{ a, b, c \right \}. Let L1={anbncm∣m,n≥0}L_{1} = \left \{ a^{n}b^{n}c^{m}\mid m,n \geq 0 \right \} and L2={ambncn∣m,n≥0}L_{2} = \left \{ a^{m}b^{n}c^{n}\mid m,n \geq 0 \right \}. Which of the following are context-free languages? L1∪L2L_{1} \cup L_{2} L1∩L2L_{1} \cap L_{2}
Official PYQ2017Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the context-free grammars over the alphabet {a,b,c}\left \{ a, b, c \right \} given below. SS and TT are non-terminals. G1:S→aSb∣T,T→cT∣ϵG_{1}:S\rightarrow aSb \mid T, T \rightarrow cT \mid \epsilon G2:S→bSa∣T,T→cT∣ϵG_{2}:S\rightarrow bSa \mid T, T \rightarrow cT \mid \epsilon The language L(G1)∩L(G2)L\left ( G_{1} \right )\cap L(G_{2}) is
Official PYQ2017Programming and Data StructuresRecursionMCQ · 1 mark
Consider the C functions foo and bar given below: int foo(int val) { int x=0; while(val > 0) { x = x + foo(val--); } return val; } int bar(int val) { int x = 0; while(val > 0) { x= x + bar(val-1); } return val; } Invocations of foo(3)foo(3) and bar(3)bar(3) will result in:
Official PYQ2017Programming and Data StructuresRecursionMCQ · 1 mark
Consider the following two functions. void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf("%d", n); fun1(++n); printf("%d", n); } The output printed when fun1(5)\text{fun1}(5) is called is
Official PYQ2017Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
If GG is a grammar with productions S→SaS∣aSb∣bSa∣SS∣ϵS\rightarrow SaS\mid aSb\mid bSa\mid SS\mid\epsilon where SS is the start variable, then which one of the following strings is not generated by GG?
Official PYQ2017Digital LogicSequential CircuitsMCQ · 1 mark
Consider a combination of T\text{T} and D\text{D} flip-flops connected as shown below. The output of the D\text{D} flip-flop is connected to the input of the T\text{T} flip-flop and the output of the T\text{T} flip-flop is connected to the input of the D\text{D} flip-flop. Initially, both Q0Q_{0} and Q1Q_{1} are set to 11 (before the …
Official PYQ2017Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
A computer network uses polynomials over GF(2)GF(2) for error checking with 88 bits as information bits and uses x3+x+1x^{3}+x+1 as the generator polynomial to generate the check bits. In this network, the message 0101101101011011 is transmitted as:
Official PYQ2017Engineering MathematicsEigenvalues and Eigenvectors, LU DecompositionMCQ · 1 mark
Let AA be n×nn\times n real valued square symmetric matrix of rank 22 with ∑i=1n∑j=1nAij2=50.\sum_{i=1}^{n}\sum_{j=1}^{n}A^{2}_{ij} = 50. Consider the following statements. One eigenvalue must be in [−5,5]\left [ -5,5 \right ] The eigenvalue with the largest magnitude must be strictly greater than 55 Which of the above statements about eigenvalues of AA is/are …