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 PYQ2016AlgorithmsAsymptotic Worst Case Time and Space ComplexityNAT · 1 mark
The given diagram shows the flowchart for a recursive function A(n)A(n). Assume that all statements, except for the recursive calls, have O(1)O(1) time complexity. If the worst case time complexity of this function is O(nα)O(n^{\alpha}), then the least possible value (accurate up to two decimal positions) of α\alpha is ________. Flow chart for Recursive …
Official PYQ2016Programming and Data StructuresProgramming in CMCQ · 1 mark
The following function computes XYX^{Y} for positive integers XX and YY. int exp (int X, int Y) { int res =1, a = X, b = Y; while (b != 0) { if (b % 2 == 0) {a = a * a; b = b/2; } else {res = res * a; b = b - 1; } } return res; } Which one of the following conditions is TRUE before every iteration of the loop?
Official PYQ2016Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsNAT · 1 mark
Consider a 128×103128 \times 10^3 bits/second satellite communication link with one way propagation delay of 150150 milliseconds. Selective retransmission (repeat) protocol is used on this link to send data with a frame size of 11 kilobyte. Neglect the transmission time of acknowledgement. The minimum number of bits required for the sequence number field to …
Official PYQ2016Operating SystemConcurrency and SynchronizationNAT · 1 mark
Consider a non-negative counting semaphore SS. The operation P(S)P(S) decrements SS, and V(S)V(S) increments SS. During an execution, 2020 P(S)P(S) operations and 1212 V(S)V(S) operations are issued in some order. The largest initial value of SS for which at least one P(S)P(S) operation will remain blocked is _______
Official PYQ2016Digital LogicComputer ArithmeticNAT · 1 mark
Consider an eight-bit ripple-carry adder for computing the sum of AA and BB, where AA and BB are integers represented in 22's complement form. If the decimal value of AA is one, the decimal value of BB that leads to the longest latency for the sum to stabilize is ___________
Official PYQ2016Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Consider the following types of languages: L1L_{1}: Regular, L2L_{2}: Context-free, L3L_{3}: Recursive, L4L_{4}: Recursively enumerable. Which of the following is/are TRUE ? L3‾∪L4\overline{L_{3}} \cup L_{4} is recursively enumerable. L2‾∪L3\overline{L_{2}} \cup L_{3} is recursive. L1∗∩L2L^{*} _{1} \cap L_{2} is context-free. …
Official PYQ2016Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.
Official PYQ2016Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityNAT · 1 mark
Let f(x)f(x) be a polynomial and g(x)=f′(x)g(x)=f'(x) be its derivative. If the degree of (f(x)+f(−x))(f(x)+f(-x)) is 1010, then the degree of (g(x)−g(−x))(g(x) - g(-x)) is __________.
Official PYQ2016AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on
Official PYQ2016Engineering MathematicsPropositional and First Order LogicNAT · 1 mark
Consider the following expressions: falsefalse QQ truetrue P∨QP\vee Q ¬Q∨P\neg Q\vee P The number of expressions given above that are logically implied by P∧(P⇒Q)P \wedge (P \Rightarrow Q) is ___________.
Official PYQ2016DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
B+ Trees are considered BALANCED because.
Official PYQ2016Programming and Data StructuresProgramming in CNAT · 1 mark
The value printed by the following program is _______. void f (int * p, int m) { m = m + 5; *p = *p + m; return; } void main () { int i=5, j=10; f (&i, j); printf ("%d", i+j); }
Official PYQ2016AlgorithmsGraph Traversals (BFS, DFS)NAT · 1 mark
Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex tt at a distance four from the root. If tt is the nthn^{\text{th}} vertex in this BFS traversal, then the maximum possible value of nn is __________
Official PYQ2016Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
The number of states in the minimum sized DFA that accepts the language defined by the regular expression. (0+1)∗(0+1)(0+1)∗(0+1)^{*} (0+1) (0+1)^{*} is ________.
Official PYQ2016AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in the ascending order, which of the following are TRUE? Quicksort runs in Θ(n2)\Theta (n^2) time Bubblesort runs in Θ(n2)\Theta (n^2) time Mergesort runs in Θ(n)\Theta (n) time Insertion sort runs in Θ(n)\Theta (n) time
Official PYQ2016Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?
Official PYQ2016Programming and Data StructuresLinked ListsMCQ · 1 mark
NN items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed. An algorithm performs the following operations on the list in this order: Θ(N)\Theta \left(N\right) delete, …
Official PYQ2016Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
Anarkali digitally signs a message and sends it to Salim. Verification of the signature by Salim requires.
Official PYQ2016Engineering MathematicsGraphs: Connectivity, Matching, ColouringNAT · 1 mark
The minimum number of colours that is sufficient to vertex-colour any planar graph is ________.
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Suppose a database schedule SS involves transactions T1,…,TnT_1,\ldots,T_n . Construct the precedence graph of SS with vertices representing the transactions and edges representing the conflicts. If SS is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?