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 PYQ2011AlgorithmsMinimum Spanning TreesMCQ · 1 mark
An undirected graph G(V,E)G(V,E) contains n (n>2)n \: (n>2) nodes named v1,v2,…,vnv_1,v_2, \dots, v_n. Two nodes vi,vjv_i, v_j are connected if and only if 0<∣i−j∣≤20 < \mid i-j\mid \leq 2. Each edge (vi,vj)(v_i,v_j) is assigned a weight i+ji+j. A sample graph with n=4n=4 is shown below. The length of the path from v5v_5 to v6v_6 in the MST of previous question with …
Official PYQ2011AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
Consider the following recursive C function that takes two arguments. unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r) + foo(n/r, r)); else return 0; } What is the return value of the function foo\text{foo} when it is called as foo(513, 2)\text{foo(513, 2)}?
Official PYQ2011Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration. If all the flip-flops were reset to 00 at power on, what is the total number of distinct outputs (states) represented by PQRPQR generated by the counter?
Official PYQ2011Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let PP be a regular language and QQ be a context-free language such that Q⊆PQ \subseteq P. (For example, let PP be the language represented by the regular expression p∗q∗p^*q^* and QQ be {pnqn∣n∈N})\{p^nq^n \mid n \in N\}). Then which of the following is ALWAYS regular?
Official PYQ2011Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
Consider a network with five nodes, N1N1 to N5N5, as shown as below. The network uses a Distance Vector Routing protocol. Once the routes have been stabilized, the distance vectors at different nodes are as follows. N1: (0,1,7,8,4)(0, 1, 7, 8, 4) N2: (1,0,6,7,3)(1, 0, 6, 7, 3) N3: (7,6,0,2,6)(7, 6, 0, 2, 6) N4: (8,7,2,0,4)(8, 7, 2, 0, 4) N5: (4,3,6,4,0)(4, 3, 6, 4, 0) Each distance vector …
Official PYQ2011General AptitudeMCQ · 1 mark
A container originally contains 1010 litres of pure spirit. From this container, 11 litre of spirit replaced with 11 litre of water. Subsequently, 11 litre of the mixture is again replaced with 11 litre of water and this process is repeated one more time. How much spirit is now left in the container?
Official PYQ2011General AptitudeMCQ · 1 mark
A transporter receives the same number of orders each day. Currently, he has some pending orders (backlog) to be shipped. If he uses 77 trucks, then at the end of the 4th4^{th} day he can clear all the orders. Alternatively, if he uses only 33 trucks, then all the orders are cleared at the end of the 10th10^{th} day. What is the minimum number of …
Official PYQ2011General AptitudeMCQ · 1 mark
The variable cost (V)(V) of manufacturing a product varies according to the equation V=4qV=4q, where qq is the quantity produced. The fixed cost (F)(F) of production of same product reduces with qq according to the equation F=100qF=\dfrac{100}{q}. How many units should be produced to minimize the total cost (V+F)(V+F)?
Official PYQ2011General AptitudeMCQ · 1 mark
Few school curricula include a unit on how to deal with bereavement and grief, and yet all students at some point in their lives suffer from losses through death and parting. Based on the above passage which topic would not be included in a unit on bereavement?
Official PYQ2011General AptitudeMCQ · 1 mark
P,Q,RP, Q, R and SS are four types of dangerous microbes recently found in a human habitat. The area of each circle with its diameter printed in brackets represents the growth of a single microbe surviving human immunity system within 2424 hours of entering the body. The danger to human beings varies proportionately with the toxicity, potency and growth …
Official PYQ2011General AptitudeMCQ · 1 mark
Choose the word from the options given below that is most nearly opposite in the meaning to the given word Amalgamate
Official PYQ2011General AptitudeMCQ · 1 mark
Choose the most appropriate word from the options given below to complete the following sentence. If you are trying to make a strong impression on your audience, you cannot do so by being understated, tentative or ________.
Official PYQ2011General AptitudeMCQ · 1 mark
Choose the most appropriate word(s) from the options given below to complete the following sentence. I contemplated _________ Singapore for my vacation but decided against it.
Official PYQ2011General AptitudeMCQ · 1 mark
If log⁡(P)=(1/2)log⁡(Q)=(1/3)log⁡(R)\log (\text{P}) = (1/2)\log (\text{Q}) = (1/3)\log (\text{R}), then which of the following options is TRUE?
Official PYQ2011General AptitudeMCQ · 1 mark
Which of the following options is the closest in the meaning to the word below: Inexplicable
Official PYQ2011AlgorithmsMinimum Spanning TreesMCQ · 1 mark
An undirected graph G(V,E)G(V,E) contains n (n>2)n \: (n>2) nodes named v1,v2,…,vnv_1,v_2, \dots, v_n. Two nodes vi,vjv_i, v_j are connected if and only if 0<∣i−j∣≤20 < \mid i-j\mid \leq 2. Each edge (vi,vj)(v_i,v_j) is assigned a weight i+ji+j. A sample graph with n=4n=4 is shown below. What will be the cost of the minimum spanning tree (MST) of such a graph with nn …
Official PYQ2011Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
Consider a network with five nodes, N1N1 to N5N5, as shown as below. The network uses a Distance Vector Routing protocol. Once the routes have been stabilized, the distance vectors at different nodes are as follows. N1: (0,1,7,8,4)(0, 1, 7, 8, 4) N2: (1,0,6,7,3)(1, 0, 6, 7, 3) N3: (7,6,0,2,6)(7, 6, 0, 2, 6) N4: (8,7,2,0,4)(8, 7, 2, 0, 4) N5: (4,3,6,4,0)(4, 3, 6, 4, 0) Each distance vector …
Official PYQ2011Digital LogicSequential CircuitsMCQ · 1 mark
Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration. If at some instance prior to the occurrence of the clock edge, P,QP, Q and RR have a value 00, 11 and 00 respectively, what shall be the value of PQRPQR after the clock edge?
Official PYQ2011AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
Consider the following recursive C function that takes two arguments. unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r) + foo(n/r, r)); else return 0; } What is the return value of the function foo\text{foo} when it is called as foo(345, 10)\text{foo(345, 10)}?
Official PYQ2011Software Engineering (Historical)MCQ · 1 mark
The following is the comment written for a C function. /* This function computes the roots of a quadratic equation a.x^2 + b.x + c = 0. The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases. (i) When coefficient a is zero irrespective of discriminant (ii) When …