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 PYQ2014Digital LogicCombinational CircuitsMCQ · 1 mark
The above synchronous sequential circuit built using JK flip-flops is initialized with Q2Q1Q0=000Q_2Q_1Q_0 = 000. The state sequence for this circuit for the next 33 clock cycles is
Official PYQ2014Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 1 mark
The memory access time is 11 nanosecond for a read operation with a hit in cache, 55 nanoseconds for a read operation with a miss in cache, 22 nanoseconds for a write operation with a hit in cache and 1010 nanoseconds for a write operation with a miss in cache. Execution of a sequence of instructions involves 100100 instruction fetch operations, …
Official PYQ2014Computer Organization and ArchitectureInstruction PipeliningNAT · 1 mark
An instruction pipeline has five stages, namely, instruction fetch (IF), instruction decode and register fetch (ID/RF), instruction execution (EX), memory access (MEM), and register writeback (WB) with stage latencies 11 ns, 2.22.2 ns, 22 ns, 11 ns, and 0.750.75 ns, respectively (ns stands for nanoseconds). To gain in terms of frequency, the …
Official PYQ2014Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
Consider the C function given below. Assume that the array listAlistA contains n(>0)n (>0) elements, sorted in ascending order. int ProcessArray(int *listA, int x, int n) { int i, j, k; i = 0; j = n-1; do { k = (i+j)/2; if (x <= listA[k]) j = k-1; if (listA[k] <= x) i = k+1; } while (i <= j); if (listA[k] == x) return(k); else return -1; } Which …
Official PYQ2014Programming and Data StructuresTreesMCQ · 1 mark
Consider the pseudocode given below. The function DoSomething()DoSomething() takes as argument a pointer to the root of an arbitrary tree represented by the leftMostChild−rightSiblingleftMostChild-rightSibling representation. Each node of the tree is of type treeNodetreeNode. typedef struct treeNode* treeptr; struct treeNode { treeptr leftMostChild, rightSibling; }; int DoSomething (treeptr …
Official PYQ2014Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
Consider a hash table with 100100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 33 slots are unfilled after the first 33 insertions?
Official PYQ2014Programming and Data StructuresBinary Search TreesNAT · 1 mark
Suppose we have a balanced binary search tree TT holding nn numbers. We are given two numbers LL and HH and wish to sum up all the numbers in TT that lie between LL and HH. Suppose there are mm such numbers in TT. If the tightest upper bound on the time to compute the sum is O(nalog⁡bn+mclog⁡dn)O(n^a\log^bn+m^c\log^dn), the value of …
Official PYQ2014Theory of ComputationUndecidabilityMCQ · 1 mark
Consider the decision problem 2CNFSAT2CNFSAT defined as follows: {ϕ∣ϕ is a satisfiable propositional formula in CNF with at most two literals per clause}\left\{ \phi \mid \phi \text{ is a satisfiable propositional formula in CNF with at most two literals per clause}\right\} For example, ϕ=(x1∨x2)∧(x1∨x3ˉ)∧(x2∨x4)\phi = (x1 \vee x2) \wedge (x1 \vee \bar{x3}) \wedge (x2 \vee x4) is a Boolean formula and it is in 2CNFSAT2CNFSAT. The decision problem 2CNFSAT2CNFSAT is
Official PYQ2014AlgorithmsAlgorithm Design: Dynamic ProgrammingNAT · 1 mark
Suppose you want to move from 00 to 100100 on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers i, j with i<ji,\:j \:\text{with}\: i <j. Given a shortcut (i,j)(i,j), if you are at position ii on the number line, you may directly move to jj. Suppose T(k)T(k) …
Official PYQ2014Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the following languages over the alphabet ∑={0,1,c}\sum = \{0, 1, c\} L1={0n1n∣n≥0}L_1 = \left\{0^n1^n\mid n \geq 0\right\} L2={wcwr∣w∈{0,1}∗}L_2 = \left\{wcw^r \mid w \in \{0,1\}^*\right\} L3={wwr∣w∈{0,1}∗}L_3 = \left\{ww^r \mid w \in \{0,1\}^*\right\} Here, wrw^r is the reverse of the string ww. Which of these languages are deterministic Context-free languages?
Official PYQ2014Theory of ComputationUndecidabilityMCQ · 1 mark
Which one of the following problems is undecidable?
Official PYQ2014Compiler DesignLocal OptimizationMCQ · 1 mark
Consider the basic block given below. a = b + c c = a + d d = b + c e = d - b a = e + b The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are
Official PYQ2014Operating SystemMemory Management and Virtual MemoryNAT · 1 mark
Consider a paging hardware with a TLBTLB. Assume that the entire page table and all the pages are in the physical memory. It takes 1010 milliseconds to search the TLBTLB and 8080 milliseconds to access the physical memory. If the TLBTLB hit ratio is 0.60.6, the effective memory access time (in milliseconds) is _________.
Official PYQ2014Operating SystemCPU SchedulingNAT · 1 mark
An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds): …
Official PYQ2014Operating SystemDeadlockNAT · 1 mark
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.
Official PYQ2014DatabasesNormal FormsMCQ · 1 mark
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation. employee (empId, empName, empAge) dependent (depId, eId, depName, depAge) Consider the following relational algebra query: …
Official PYQ2014DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the transactions T1,T2, and T3T1, T2, \:\text{and} \:T3 and the schedules S1 and S2S1 \:\text{and} \:S2 given below. T1:r1(X);r1(Z);w1(X);w1(Z)T1: r1(X); r1(Z); w1(X); w1(Z) T2:r2(Y);r2(Z);w2(Z)T2: r2(Y); r2(Z); w2(Z) T3:r3(Y);r3(X);w3(Y)T3: r3(Y); r3(X); w3(Y) S1:r1(X);r3(Y);r3(X);r2(Y);r2(Z);w3(Y);w2(Z);r1(Z);w1(X);w1(Z)S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z) S2:r1(X);r3(Y);r2(Y);r3(X);r1(Z);r2(Z);w3(Y);w1(X);w2(Z);w1(Z)S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z) …
Official PYQ2014Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
An IPIP router with a Maximum Transmission Unit (MTU)\text{Maximum Transmission Unit (MTU)} of 15001500 bytes has received an IPIP packet of size 4404 bytes4404\text{ bytes} with an IPIP header of length 20 bytes20\text{ bytes}. The values of the relevant fields in the header of the third IPIP fragment generated by the router for this packet are:
Official PYQ2014Computer NetworksFragmentation and IP Addressing, IPv4, CIDRNAT · 1 mark
Every host in an IPv4\textsf{IPv4} network has a 1-second1\text{-second} resolution real-time clock with battery backup. Each host needs to generate up to 10001000 unique identifiers per second. Assume that each host has a globally unique IPv4\textsf{IPv4} address. Design a 50-bit50\text{-bit} globally unique ID for this purpose. After what period (in seconds) …
Official PYQ2014Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateNAT · 1 mark
An IP router implementing Classless Inter-domain Routing (CIDR) receives a packet with address 131.23.151.76131.23.151.76. The router's routing table has the following entries: …