The GATE Grind

GATE 2012 CS (CS1) – Previous Year Questions with Solutions

All 65 questions of GATE 2012 CS (CS1) 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) – A firm’s cost is 5q2 for production q and its selling price is 50 per unit. How many units maximize profit?
  2. Question 2 (1 mark, Multiple choice) – Despite several the mission succeeded in its attempt to resolve the conflict.
  3. Question 3 (1 mark, Multiple choice) – Choose the closest meaning of “mitigate”.
  4. Question 4 (1 mark, Multiple choice) – Choose the grammatically INCORRECT sentence.
  5. Question 5 (1 mark, MTA) – Suresh’s dog is the one was hurt in the stampede.
  6. Question 6 (2 marks, Multiple choice) – Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal interviews to collect and collate economic data.…
  7. Question 7 (2 marks, Multiple choice) – An entrance arch for a political party’s annual convention has profile y=2x-0.1x2, where y is height in metres. What is its maximum height?
  8. Question 8 (2 marks, Multiple choice) – Supplier X provides 60% and Y 40% of a plant’s shock absorbers. A quality test identifies reliable units: 96% of X’s and 72% of Y’s pass. A randomly…
  9. Question 9 (2 marks, Multiple choice) – Which assertions are correct? P: Adding seven to every list entry adds seven to the mean. Q: It adds seven to standard deviation. R: Doubling every…
  10. Question 10 (2 marks, Multiple choice) – Continue the sequence AD, CG, FK, JP.
  11. Question 11 (1 mark, Multiple choice) – I₁: If it rains, the cricket match will not be played; the match was played; infer no rain. I₂: If it rains, the match will not be played; it did not…
  12. Question 12 (1 mark, Multiple choice) – Which statement is true?
  13. Question 13 (1 mark, MTA) – Find the output of the printed C fragment. Several case labels below retain the source’s semicolons.
  14. Question 14 (1 mark, Multiple choice) – Assuming P≠NP, which is true?
  15. Question 15 (1 mark, Multiple choice) – Find the worst-case search time in a balanced BST with n2n elements.
  16. Question 16 (1 mark, Multiple choice) – A truth table gives f(0,0)=0, f(0,1)=0, f(1,0)=1, f(1,1)=1. Which Boolean function is it?
  17. Question 17 (1 mark, Multiple choice) – The decimal number 0.5 in IEEE single precision has
  18. Question 18 (1 mark, Multiple choice) – A process executes fork(); fork(); fork();. How many child processes are created?
  19. Question 19 (1 mark, Multiple choice) – For f(x)=sin x on [π/4,7π/4], find the local minima and their locations.
  20. Question 20 (1 mark, Multiple choice) – The application-layer protocol data unit in the Internet stack is called a
  21. Question 21 (1 mark, Multiple choice) – A is 2×2 with a₁₁=a₁₂=a₂₁=1 and a₂₂=−1. Find the eigenvalues of A¹⁹.
  22. Question 22 (1 mark, Multiple choice) – Over alphabet a, with ε the empty string, find the complement of the language accepted by the shown NFA.
  23. Question 23 (1 mark, Multiple choice) – Translate “Some real numbers are rational” into logic.
  24. Question 24 (1 mark, Multiple choice) – For basic ER and relational models, which is incorrect?
  25. Question 25 (1 mark, Multiple choice) – Which SQL assertions are true? P: HAVING can occur without GROUP BY. Q: HAVING requires GROUP BY. R: Every GROUP BY attribute must appear in SELECT.…
  26. Question 26 (1 mark, Multiple choice) – Which recurrence gives optimal Towers of Hanoi time for n disks?
  27. Question 27 (1 mark, Multiple choice) – A connected simple planar graph has ten vertices and fifteen edges. How many bounded faces does any plane embedding have?
  28. Question 28 (1 mark, Multiple choice) – W(n) and A(n) are worst-case and average running times on inputs of size n. Which always holds?
  29. Question 29 (1 mark, Multiple choice) – How much ROM implements a four-bit multiplier?
  30. Question 30 (1 mark, Multiple choice) – Register renaming in pipelined processors is done
  31. Question 31 (1 mark, Multiple choice) – X equals −1 or +1 with probability 0.5 each. Find F(−1),F(+1) for its cumulative distribution.
  32. Question 32 (1 mark, Multiple choice) – Which transport-layer protocol supports electronic mail?
  33. Question 33 (1 mark, Multiple choice) – In classful IPv4, how many Class C networks are possible?
  34. Question 34 (1 mark, Multiple choice) – Which problems are decidable? 1: Does an arbitrary program ever output anything? 2: Given a CFL L, is L context-free? 3: Given regular L, is L…
  35. Question 35 (1 mark, Multiple choice) – L=ab,aa,baa. Which strings belong to L*? 1: abaabaaabaa; 2: aaaabaaaa; 3: baaaaabaaaab; 4: baaaaabaa.
  36. Question 36 (2 marks, Multiple choice) – Which graph A,B,C,D is isomorphic to the given graph?
  37. Question 37 (2 marks, Multiple choice) – P=Q=0 initially. T₁ executes read(P); read(Q); if P==0 then Q:=Q+1; write(Q). T₂ executes read(Q); read(P); if Q==0 then P:=P+1; write(P). Any…
  38. Question 38 (2 marks, Multiple choice) – Apply bisection to f(x)=x4-x3-x2-4 on [1,9]. After how many iterations is an exact zero found?
  39. Question 39 (2 marks, MTA) – A graph G has edge weights greater than one. G′ squares every edge weight. T,T′ are minimum spanning trees with weights t,t′. Which is true?
  40. Question 40 (2 marks, Multiple choice) – Minimize the shown four-variable Karnaugh map. X marks don’t-care cells; blank cells are zeros.
  41. Question 41 (2 marks, Multiple choice) – Processes P₁,P₂,P₃ have (arrival,CPU time) (0,5),(1,7),(3,4). Find completion orders for FCFS and round robin with quantum two.
  42. Question 42 (2 marks, Multiple choice) – Fetch And Add(L,i) atomically returns old L and increments L by i. Shared unsigned L initially zero means unlocked; nonzero means locked. Assess this…
  43. Question 43 (2 marks, Multiple choice) – Roll a fair six-sided die once. If the first value is 1,2 or 3, roll again. What is the probability the total rolled value is at least six?
  44. Question 44 (2 marks, Multiple choice) – An ISP holds CIDR block 245.248.128.0/20. Half goes to A, one quarter to B, and the rest is retained. Which A,B allocation is valid?
  45. Question 45 (2 marks, Multiple choice) – A circular queue stores at most n−1 items in an n-element array. REAR and FRONT index insertion/deletion positions and both start zero. Identify full…
  46. Question 46 (2 marks, Multiple choice) – In a lexically scoped block-structured language, main contains sibling procedures A1 and A2; A2 contains A21. A1 calls A2; A2 calls A21; A21 calls A1;…
  47. Question 47 (2 marks, Multiple choice) – How many surjections exist from an n-element set (n≥2) to a two-element set?
  48. Question 48 (2 marks, MTA) – A complete undirected graph has six labelled vertices. How many distinct cycles of length four does it contain?
  49. Question 49 (2 marks, MTA) – Merge sort lexicographically sorts n strings, each of length n. What is the worst-case running time?
  50. Question 50 (2 marks, Multiple choice) – For the shown directed weighted graph, several S-to-T shortest paths exist. Dijkstra updates a vertex’s predecessor only on finding a strictly shorter…
  51. Question 51 (2 marks, Multiple choice) – A 300 GB disk uses file descriptors with eight direct block addresses, one indirect and one doubly indirect. Block size is 128 bytes and each address…
  52. Question 52 (2 marks, Multiple choice) – With three initially empty frames, reference string is 1,2,3,2,4,1,3,2,4,1. Let LRU,FIFO,OPTIMAL be fault counts. Which relation holds?
  53. Question 53 (2 marks, Multiple choice) – R₁(A,B) and R₂(C,D) have instances r₁,r₂. B references C as a foreign key and referential integrity holds. Which always holds?
  54. Question 54 (2 marks, Multiple choice) – S sends a 10⁶-bit file through routers R₁,R₂ over three 1 Mb/s links, each 100 km long with propagation speed 10⁸ m/s. The file is split into 1000…
  55. Question 55 (2 marks, MTA) – TCP AIMD starts slow start with window 2 MSS and initial threshold 8 MSS. A timeout occurs during transmission five. Find congestion window at the end…
  56. Question 56 (2 marks, Multiple choice) – Over 0,1, every three-symbol substring must contain at most two zeros; all words shorter than three are included. The partial DFA is shown. Which…
  57. Question 57 (2 marks, Multiple choice) – Height counts edges on the longest downward path. Fill B1 and B2.
  58. Question 58 (2 marks, Multiple choice) – What are the three output lines?
  59. Question 59 (2 marks, Multiple choice) – For the same complete code below, replace Line 1 with auto int a=1 and Line 2 with register int a=2. What are the three output lines?
  60. Question 60 (2 marks, Multiple choice) – A(Id,Name,Age)=(12,Arun,60),(15,Shreya,24),(99,Rohit,11); B(Id,Name,Age)=(15,Shreya,24),(25,Hari,40),(98,Rohit,20),(99,Rohit,11);…
  61. Question 61 (2 marks, Multiple choice) – A(Id,Name,Age)=(12,Arun,60),(15,Shreya,24),(99,Rohit,11); B(Id,Name,Age)=(15,Shreya,24),(25,Hari,40),(98,Rohit,20),(99,Rohit,11);…
  62. Question 62 (2 marks, Multiple choice) – S→aAbB bAaB ε; A→S; B→S. The partial predictive table has S row (E1,E2,S→ε), A row (A→S,A→S,error), B row (B→S,B→S,E3), for lookaheads a,b,end-marker…
  63. Question 63 (2 marks, Multiple choice) – S→aAbB bAaB ε; A→S; B→S. The partial predictive table has S row (E1,E2,S→ε), A row (A→S,A→S,error), B row (B→S,B→S,E3), for lookaheads a,b,end-marker…
  64. Question 64 (2 marks, Multiple choice) – A computer has a 256 KB, four-way set-associative, write-back data cache, 32-byte blocks and 32-bit addresses. Every tag-directory entry includes the…
  65. Question 65 (2 marks, Multiple choice) – A computer has a 256 KB, four-way set-associative, write-back data cache, 32-byte blocks and 32-bit addresses. Every tag-directory entry includes the…