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 PYQ2016Operating SystemMemory Management and Virtual MemoryNAT · 1 mark
Consider a computer system with 4040-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process and each page table entry requires 4848 bits, then the size of the per-process page table is __________ megabytes.
Official PYQ2016Digital LogicComputer ArithmeticMCQ · 1 mark
Consider a carry look ahead adder for adding two nn-bit integers, built using gates of fan-in at most two. The time to perform addition using this adder is
Official PYQ2016AlgorithmsMinimum Spanning TreesMCQ · 1 mark
Let GG be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE? PP: Minimum spanning tree of GG does not change. QQ: Shortest path between any pair of vertices does not change.
Official PYQ2016Compiler DesignData Flow Analyses: Constant Propagation, Liveness, CSENAT · 1 mark
Consider the following code segment. x = u - t; y = x * v; x = y + w; y = t - z; y = x * y; The minimum number of total variables required to convert the above code segment to static single assignment form is __________.
Official PYQ2016Programming and Data StructuresArrays, Stacks and QueuesNAT · 1 mark
Let QQ denote a queue containing sixteen numbers and SS be an empty stack. Head(Q)Head(Q) returns the element at the head of the queue QQ without removing it from QQ. Similarly Top(S)Top(S) returns the element at the top of SS without removing it from SS. Consider the algorithm given below. while Q is not Empty do if S is Empty OR Top(S) ≤ Head …
Official PYQ2016Digital LogicSequential CircuitsNAT · 1 mark
We want to design a synchronous counter that counts the sequence 0−1−0−2−0−30-1-0-2-0-3 and then repeats. The minimum number of J-K\text{J-K} flip-flops required to implement this counter is _____________.
Official PYQ2016AlgorithmsGraph Traversals (BFS, DFS)NAT · 1 mark
Consider the following directed graph: The number of different topological orderings of the vertices of the graph is _____________.
Official PYQ2016Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT (nn refers to the number of items in the queue) ?
Official PYQ2016Engineering MathematicsPropositional and First Order LogicNAT · 1 mark
Let p,q,r,sp, q, r, s represents the following propositions. p:x∈{8,9,10,11,12}p:x\in\left\{8, 9, 10, 11, 12\right\} q:q: xx is a composite number. r:r: xx is a perfect square. s:s: xx is a prime number. The integer x≥2x\geq2 which satisfies ¬((p⇒q)∧(¬r∨¬s))\neg\left(\left(p\Rightarrow q\right) \wedge \left(\neg r \vee \neg s\right)\right) is ____________.
Official PYQ2016Engineering MathematicsProbability: Random Variables and DistributionsNAT · 1 mark
A probability density function on the interval [a,1][a, 1] is given by 1/x21/x^{2} and outside this interval the value of the function is zero. The value of aa is _________.
Official PYQ2016AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
The worst case running times of Insertion sort , Merge sort and Quick sort, respectively are:
Official PYQ2016Operating SystemCPU SchedulingMCQ · 1 mark
Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?
Official PYQ2016Theory of ComputationUndecidabilityMCQ · 1 mark
Which of the following decision problems are undecidable? Given NFAs N1N_1 and N2N_2 , is L(N1)∩L(N2)=ΦL(N_1) \cap L(N_2) = \Phi Given a CFG G=(N,Σ,P,S)G = (N,\Sigma,P,S) and a string x∈Σ∗x \in \Sigma^{*}, does x∈L(G)x \in L(G)} ? Given CFGs G1G_1 and G2G_2, is L(G1)=L(G2)L (G_1) = L(G_2)? Given a TM MM, is L(M)=ΦL(M)=\Phi ?
Official PYQ2016Digital LogicNumber Representations (Fixed and Floating Point)NAT · 1 mark
The 16-bit  2′s16\text{-bit}\;2's complement representation of an integer is 1111111111110101;1111 \quad 1111 \quad 1111 \quad 0101; its decimal representation is ____________
Official PYQ2016Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 00's and two consecutive 11's?
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Which one of the following is NOT a part of the ACID properties of database transactions?
Official PYQ2016Programming and Data StructuresProgramming in CNAT · 1 mark
Consider the following C program. # include <stdio.h> void mystery (int *ptra, int *ptrb) { int *temp; temp = ptrb; ptrb =ptra; ptra = temp; } int main () { int a = 2016, b=0, c= 4, d = 42; mystery (&a, &b); if (a < c) mystery (&c, &a); mystery (&a, &d); printf("%d\n", a); } The output of the program is _________.
Official PYQ2016Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Which of the following languages is generated by the given grammar? S→aS∣bS∣εS \rightarrow aS \mid bS \mid \varepsilon
Official PYQ2016Computer NetworksApplication Layer Protocols: DNS, SMTP, HTTP, FTP, EmailMCQ · 1 mark
Which one of the following protocols is NOT used to resolve one form of address to another one?
Official PYQ2016Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following "C" program. void f(int, short); void main() { int i = 100; short s = 12; short *p = &s; ____________; // call to f() } Which one of the following expressions , when placed in the blank above, will NOT result in a type checking error?