The GATE Grind

GATE 2014 CS (CS2) – Previous Year Questions with Solutions

All 65 questions of GATE 2014 CS (CS2) with answers and explanations. Read each question, then practise it by topic or as a full paper.

Practise this paper in The GATE Grind →

  1. Question 1 (1 mark, Multiple choice) – Complete the sentence: “India is a post-colonial country because .”
  2. Question 2 (1 mark, Multiple choice) – Who was coming to see us this evening?
  3. Question 3 (1 mark, Multiple choice) – Match 1: eradicate; 2: distort; 3: saturate; 4: utilize with P: misrepresent; Q: soak completely; R: use; S: destroy utterly.
  4. Question 4 (1 mark, Multiple choice) – Find the average of all multiples of 10 from 2 to 198.
  5. Question 5 (1 mark, Multiple choice) – Evaluate 12+12+12+.
  6. Question 6 (2 marks, Multiple choice) – The old city of Koenigsberg, with a German majority before World War 2, is now called Kaliningrad. After the war it became Russian territory with a…
  7. Question 7 (2 marks, Multiple choice) – Dengue diagnoses in north India are twice last year’s number. Municipal authorities conclude mosquito-control measures have failed. Which statement,…
  8. Question 8 (2 marks, Multiple choice) – For real x with x2-2x+3 =11, possible values of -x3+x2-x include .
  9. Question 9 (2 marks, Numerical answer) – The line graph shows male-to-female student ratios over five years. If female enrolment doubled in 2009, by what percentage did male enrolment…
  10. Question 10 (2 marks, Multiple choice) – Between 6 am and 7 am, which listed time gives the angle between minute and hour hands closest to 60°?
  11. Question 11 (1 mark, Numerical answer) – An IT-office security system has 10 computers, exactly four working. Officials inspect four chosen uniformly without replacement. The system is deemed…
  12. Question 12 (1 mark, Numerical answer) – Each of the nine words in “The quick brown fox jumps over the lazy dog” is written on a separate slip. A slip is drawn randomly from a box. Find…
  13. Question 13 (1 mark, Numerical answer) – Find the maximum edges in a bipartite graph on 12 vertices.
  14. Question 14 (1 mark, Numerical answer) – If A=pmatrix2\\-4\\7pmatrixpmatrix1&9&5pmatrix, find det(A).
  15. Question 15 (1 mark, Multiple choice) – A nonzero degree-three polynomial f has roots 1, 2 and 3. Which must be TRUE?
  16. Question 16 (1 mark, Multiple choice) – The dual FD of Boolean function F(x 1,,x n,+,,) swaps + and ·. F is self-dual when F=FD. How many self-dual functions of n Boolean variables exist?
  17. Question 17 (1 mark, Multiple choice) – Let k=2n. An n-bit binary counter drives an n-to-2n decoder. This is equivalent to a .
  18. Question 18 (1 mark, Numerical answer) – For (123)₅ = (x8)ᵧ, x and y are unknown. Find the number of possible solutions.
  19. Question 19 (1 mark, Numerical answer) – A 4-way set-associative cache has capacity 16 KB and blocks of 8 words. Words are 32 bits and physical address space is 4 GB. Find TAG-field width…
  20. Question 20 (1 mark, Numerical answer) – For the C function below, find func(435). int func(int num) int count = 0; while (num) count++; num >>= 1; return count;
  21. Question 21 (1 mark, Multiple choice) – n and p are unsigned int in C. To set p to n choose 3 for large n, which is most likely correct?
  22. Question 22 (1 mark, Multiple choice) – A max-heap priority queue initially has level order 10,8,5,3,2. Insert 1 then 7. Find the resulting level order.
  23. Question 23 (1 mark, Multiple choice) – Which gives the solution of T(n)=2T(n/2)+ n, T(1) = 1?
  24. Question 24 (1 mark, Multiple choice) – A BFS from W in an unweighted connected undirected graph gives tree T. T is a data structure for computing .
  25. Question 25 (1 mark, Multiple choice) – Let L 1=\an:n0\ and L 2=\bn:n0\. I: L 1L 2 is regular. II: L 1L 2=\anbn:n0\. Which is correct?
  26. Question 26 (1 mark, Multiple choice) – A mB means A is mapping (many-one) reducible to B. Which implication is FALSE?
  27. Question 27 (1 mark, Multiple choice) – Grammar: S → T * P; T → U T * U; P → Q + P Q; Q → Id; U → Id. Which is TRUE?
  28. Question 28 (1 mark, Multiple choice) – Which is NOT performed during compilation?
  29. Question 29 (1 mark, Multiple choice) – Which one of the following is TRUE?
  30. Question 30 (1 mark, Numerical answer) – A FAT file system has 4-byte entries. Disk size is 100 × 10⁶ bytes and data-block size 10³ bytes. Find maximum file size (units of 10⁶ bytes).
  31. Question 31 (1 mark, Numerical answer) – Find the maximum number of superkeys of R(E,F,G,H) with E as the key.
  32. Question 32 (1 mark, Numerical answer) – STUDENTS has rows (StudentID,StudentName,StudentEmail,StudentAge,CPI): (2345,Shankar,shankar@math,X,9.4), (1287,Swati,swati@ee,19,9.5),…
  33. Question 33 (1 mark, Multiple choice) – Which statement about interior routing protocols RIP and OSPF is TRUE?
  34. Question 34 (1 mark, Multiple choice) – Which socket API converts an unconnected active TCP socket into a passive socket?
  35. Question 35 (1 mark, Numerical answer) – In the diagram, L1 is Ethernet and L2 is Token-Ring. An IP packet travels from S to R. Links within and across the two ISPs are point-to-point optical…
  36. Question 36 (2 marks, Multiple choice) – A store-and-forward network A—R1—R2—B has bandwidth 10⁶ bytes/s on every link. A 10³-byte file is sent three ways: one packet (time T₁), 10 equal…
  37. Question 37 (2 marks, Multiple choice) – Q reaches HTTP server H through Q—R1—R2—R3—H and downloads a file. DES shared-key encryption is at session layer. I1: Downloaded file URL; I2: TCP…
  38. Question 38 (2 marks, Multiple choice) – A graphical HTML browser at Q fetches a static HTML page from HTTP server S. The page has exactly one static embedded image, also at S. With no…
  39. Question 39 (2 marks, Multiple choice) – For the shown schedule S of T1, T2, T3 and T4, which statement is correct?
  40. Question 40 (2 marks, Multiple choice) – A nested-loop relational join of r(R) and s(S) uses three disk-block-sized buffers, one reserved for results. If size(r) < size(s), disk accesses are…
  41. Question 41 (2 marks, Multiple choice) – Producer–consumer uses semaphores n = 0 and s = 1. producer: repeat forever produce(); semWait(s); addToBuffer(); semSignal(s); semSignal(n);…
  42. Question 42 (2 marks, Numerical answer) – Processes A,B,C each run 100 iterations, each consisting of t c CPU time followed by t io I/O time. They have separate I/O devices; OS overhead is…
  43. Question 43 (2 marks, Multiple choice) – Twenty page frames initially contain pages 101–120. A program accesses 1,2,…,100 in order, repeating this sequence thrice. Which replacement policy…
  44. Question 44 (2 marks, Multiple choice) – A compiler generates this for C access X[i][j][k], with 32-bit int and 8-bit char: t0 = i * 1024 t1 = j * 32 t2 = k * 4 t3 = t1 + t0 t4 = t3 + t2 t5 =…
  45. Question 45 (2 marks, Multiple choice) – Let M encode a Turing machine over 0,1. Let L=\ M:M accepts a string of length 2014\. L is .
  46. Question 46 (2 marks, Multiple choice) – L₁ consists of binary strings with at least as many occurrences of 110 as of 011. L₂ consists of binary strings with at least as many occurrences of…
  47. Question 47 (2 marks, Numerical answer) – A = “qpqrr”, B = “pqprqrp”. Let x be their longest common subsequence length (not necessarily contiguous), and y the number of such longest common…
  48. Question 48 (2 marks, Numerical answer) – Sorted sequences P,Q,R,S,T have lengths 20,24,30,35,50. Merge them into one by merging two sequences at a time. Find worst-case comparisons for an…
  49. Question 49 (2 marks, Numerical answer) – Each leaf of the shown expression tree independently has value 0 or 1. Find the maximum value of the expression over all leaf assignments.
  50. Question 50 (2 marks, Numerical answer) – Consider: double f(double x) if (abs(x*x - 3) < 0.01) return x; else return f(x/2 + 1.5/x); Give q to two decimals such that f(q) returns q.
  51. Question 51 (2 marks, Multiple choice) – A stack supports REVERSE (reverses all elements) in addition to PUSH and POP. Which is TRUE?
  52. Question 52 (2 marks, Multiple choice) – Consider the C function: int f(int j) static int i = 50; int k; if (i == j) printf("something"); k = f(i); return 0; else return 0; Which is TRUE?
  53. Question 53 (2 marks, Multiple choice) – Which statement about cache-block size is correct?
  54. Question 54 (2 marks, Multiple choice) – Cache associativity doubles while capacity and block size stay fixed. Which is guaranteed unaffected?
  55. Question 55 (2 marks, Multiple choice) – IEEE-754 single precision uses 1 sign bit, 8 biased-exponent bits and 23 fraction bits. Float X = −14.25. Find its hexadecimal representation.
  56. Question 56 (2 marks, Multiple choice) – Newton–Raphson starts at x 0=2 for 0.75x3-2x2-2x+4=0. I: x 3=0. II: The method converges to a solution in finitely many iterations. Which is TRUE?
  57. Question 57 (2 marks, Numerical answer) – Find the product of nonzero eigenvalues of pmatrix1&0&0&0&1\\0&1&1&1&0\\0&1&1&1&0\\0&1&1&1&0\\1&0&0&0&1pmatrix.
  58. Question 58 (2 marks, Numerical answer) – Find probability that a positive integer chosen uniformly from 1–100 inclusive is NOT divisible by 2, 3 or 5.
  59. Question 59 (2 marks, Numerical answer) – Find the number of distinct positive integer factors of 2014.
  60. Question 60 (2 marks, Multiple choice) – S is the set of integers from 1 to 2014. For distinct subsets U,V, define U < V when the minimum element of their symmetric difference belongs to U.…
  61. Question 61 (2 marks, Numerical answer) – A cycle on n vertices is isomorphic to its complement. Find n.
  62. Question 62 (2 marks, Numerical answer) – Find the number of distinct minimum spanning trees of the weighted graph shown.
  63. Question 63 (2 marks, Multiple choice) – Which Boolean expression is NOT a tautology?
  64. Question 64 (2 marks, Multiple choice) – SQL allows duplicate tuples and multiplicities in joins. Which query always gives the same result as “select * from R where a in (select S.a from S)”?
  65. Question 65 (2 marks, Numerical answer) – Eight memory modules share a one-word-wide bus. A write occupies the bus for 100 ns with data, address and control. The addressed module is busy for…