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
Six people are seated around a circular table. There are at least two men and two women. There are at least three right-handed persons. Every woman has a left-handed person to her immediate right. None of the women are right-handed. The number of women at the table is
Official PYQ2017General AptitudeMCQ · 1 mark
The probability that a kk-digit number does NOT contain the digits 0,5,0, 5, or 99 is
Official PYQ2017General AptitudeMCQ · 1 mark
Find the smallest number yy such that y×162y \times 162 is a perfect cube.
Official PYQ2017General AptitudeMCQ · 1 mark
Rahul, Murali, Srinivas and Arul are seated around a square table. Rahul is sitting to the left of Murali. Srinivas is sitting to the right of Arul. Which of the following pairs are seated opposite each other?
Official PYQ2017General AptitudeMCQ · 1 mark
Research in the workplace reveals that people work for many reasons _______________ .
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: