The GATE Grind

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

All 65 questions of GATE 2015 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) – Fill both blanks: We our friend’s birthday and we how to make it up to him.
  2. Question 2 (1 mark, Multiple choice) – Choose the sentence using personnel correctly.
  3. Question 3 (1 mark, Multiple choice) – A generic term including clothing such as skirts, trousers and shirts is
  4. Question 4 (1 mark, Multiple choice) – What is the total weight of ten identical poles? I: One fourth of one pole weighs 5 kg. II: Ten poles weigh 160 kg more than two poles. Choose the…
  5. Question 5 (1 mark, Multiple choice) – For f(x)=1− x on −1≤x≤1, give the maximizing x and maximum value, respectively.
  6. Question 6 (2 marks, Multiple choice) – Choose the sentence with the most suitable grammar and usage.
  7. Question 7 (2 marks, Multiple choice) – In triangle PQR, PQ=r, PR=q and QR=p. PS bisects ∠QPR, S lies on QR, and ∠QPS=60°. Find PS.
  8. Question 8 (2 marks, Numerical answer) – For distinct integers p,q,r,s, f(p,q,r,s)=max(p,q,r,s), g(p,q,r,s)=min(p,q,r,s), and h(p,q,r,s) is the remainder when the larger of pq and rs is…
  9. Question 9 (2 marks, Multiple choice) – P,R,S,T,U form an arithmetic progression. Which lists must also be arithmetic progressions? I: 2P,2R,2S,2T,2U II: P−3,R−3,S−3,T−3,U−3 III:…
  10. Question 10 (2 marks, Multiple choice) – Company branches are at M,N,O,P. M is 4 km north of N; P is 2 km south of O; N is 1 km southeast of O. Find the straight-line distance MP in km.
  11. Question 11 (1 mark, Multiple choice) – S1: If a candidate is known to be corrupt, he will not be elected. S2: If a candidate is kind, he will be elected. Which follows logically?
  12. Question 12 (1 mark, Numerical answer) – Find the cardinality of the power set of 0,1,2,…,10.
  13. Question 13 (1 mark, Multiple choice) – On positive integers, aRb iff a≠b and a,b have a common divisor greater than one. Which describes R?
  14. Question 14 (1 mark, Numerical answer) – How many positive divisors does 2100 have?
  15. Question 15 (1 mark, Numerical answer) – Find the larger eigenvalue of pmatrix4&5\\2&1pmatrix.
  16. Question 16 (1 mark, Multiple choice) – An unordered list contains n distinct elements. How many comparisons are needed to find any element that is neither its maximum nor minimum? Assume…
  17. Question 17 (1 mark, Numerical answer) – Find the minimum number of JK flip-flops for a synchronous counter with output sequence 0,0,1,1,2,2,3,3,0,0,… .
  18. Question 18 (1 mark, Numerical answer) – A read takes 50 ns on a cache miss and 5 ns on a hit. Eighty percent of read requests hit. Find the average read time in ns.
  19. Question 19 (1 mark, Numerical answer) – A computer has 40-bit virtual addresses, 8 KB pages, and a 128-entry TLB arranged as 32 sets with four ways each. The TLB stores no process ID. Find…
  20. Question 20 (1 mark, Multiple choice) – Which statements are true? I: The complement of every Turing-decidable language is Turing-decidable. II: Some language in NP is not Turing-decidable.…
  21. Question 21 (1 mark, Multiple choice) – What does foo("ABCD EFGH") print?
  22. Question 22 (1 mark, Multiple choice) – A complete binary tree has max-heaps as the left and right subtrees of its root. Which lower bound describes operations to convert the whole tree to a…
  23. Question 23 (1 mark, Numerical answer) – A binary tree T has 20 leaves. How many nodes have exactly two children?
  24. Question 24 (1 mark, Numerical answer) – Find fun(5).
  25. Question 25 (1 mark, Multiple choice) – Which should a software requirements specification avoid discussing?
  26. Question 26 (1 mark, Multiple choice) – Decision problem Q1 reduces in polynomial time to 3-SAT, and 3-SAT reduces in polynomial time to Q2. Which conclusion is consistent with these…
  27. Question 27 (1 mark, Multiple choice) – Match P: lexical analysis; Q: parsing; R: register allocation; S: expression evaluation. Techniques: 1 graph colouring; 2 DFA minimization; 3…
  28. Question 28 (1 mark, Multiple choice) – Which statement about abstract syntax trees (ASTs) and control-flow graphs (CFGs) is true?
  29. Question 29 (1 mark, Multiple choice) – In basic COCOMO, E is person-month effort, D chronological development months, KLOC thousands of delivered lines, and a b,b b,c b,d b are model…
  30. Question 30 (1 mark, Multiple choice) – Six identical resources are shared by N competing processes. Each process can request at most 2 resources. Which N could lead to deadlock?
  31. Question 31 (1 mark, Multiple choice) – A transaction transfers money between accounts x,y: The requirement that x+y remain constant is a constraint of which transaction property?
  32. Question 32 (1 mark, Numerical answer) – For the B+ tree of order 1 shown, find the minimum number of index nodes, including the root, fetched to retrieve all records with search key ≥7 and…
  33. Question 33 (1 mark, Multiple choice) – In which order does a UNIX socket server invoke accept, bind, listen and recv?
  34. Question 34 (1 mark, Numerical answer) – A link transmits at 106 bits/s using 1000-byte data packets. ACK transmission and node processing delays are negligible; ACK propagation equals data…
  35. Question 35 (1 mark, Multiple choice) – Which statement about HTTP cookies is NOT correct?
  36. Question 36 (2 marks, Multiple choice) – An IP router has these routes: Network Mask Next hop --- --- --- 128.96.170.0 255.255.254.0 Interface 0 128.96.168.0 255.255.254.0 Interface 1…
  37. Question 37 (2 marks, Multiple choice) – Host A sends 8880 bytes of user data by UDP over Ethernet with MTU 1500 bytes. UDP header is 8 bytes and IP header 20 bytes with no options. Find the…
  38. Question 38 (2 marks, Multiple choice) – A TCP connection has bandwidth 1048560 bits/s. Let α be the RTT in milliseconds, rounded to the nearest integer, beyond which window scaling is…
  39. Question 39 (2 marks, Multiple choice) – A simple-checkpoint recovery log contains: A crash occurs now. Choose the undo and redo lists.
  40. Question 40 (2 marks, Multiple choice) – R1(A,B)=(1,5),(3,7) and R2(A,C)=(1,7),(4,9). Let R be their full natural outer join. Candidate tuples are a=(1,5,NULL), b=(1,NULL,7), c=(3,NULL,9),…
  41. Question 41 (2 marks, Multiple choice) – Six fixed memory partitions have sizes 200,400,600,500,300,250 KB. Processes of 357,210,468,491 KB arrive in that order. Under best fit, which…
  42. Question 42 (2 marks, Numerical answer) – A disk rotates at 15000 RPM and transfers 50106 bytes/s. Average seek time is twice average rotational delay. Controller transfer time is ten times…
  43. Question 43 (2 marks, Numerical answer) – A system has 8 KB pages and 32-bit physical addresses. Every page-table entry contains valid, dirty, three permission bits, and a translation. Maximum…
  44. Question 44 (2 marks, Multiple choice) – Find the numbers of basic-block nodes and edges in the control-flow graph for:
  45. Question 45 (2 marks, Numerical answer) – Find the number of states in the minimal DFA for (0+1)*(10).
  46. Question 46 (2 marks, Multiple choice) – Which languages are regular? L 1=\wxwR:w,x\a,b\*,\ w , x >0\; L 2=\anbm:m n,\ m,n0\; L 3=\apbqcr:p,q,r0\.
  47. Question 47 (2 marks, Multiple choice) – Match algorithms 1 Dijkstra shortest path, 2 Floyd–Warshall all-pairs shortest paths, 3 binary search, 4 backtracking graph search, with paradigms i…
  48. Question 48 (2 marks, Numerical answer) – A Young tableau has unique finite entries increasing along rows and columns; empty cells are ∞, with no finite entry to the right of or below an empty…
  49. Question 49 (2 marks, Multiple choice) – partition(a,n) uses a[0] as pivot, moves values ≤pivot left and greater values right, and places the pivot last in the left part. Complete the…
  50. Question 50 (2 marks, Multiple choice) – Which integer hash function distributes keys i=0,…,2020 most uniformly over buckets 0,…,9?
  51. Question 51 (2 marks, Multiple choice) – The secant method starts with distinct estimates x a,x b and repeatedly sets x t=?, then x a=x b, x b=x t, and f b=f(x b), stopping at small residual…
  52. Question 52 (2 marks, Numerical answer) – What does this C program print?
  53. Question 53 (2 marks, Numerical answer) – A four-stage pipeline has IF (fetch/decode), OF (operand fetch), PO (perform operation), WB (writeback). IF,OF,WB take one cycle; PO takes one for…
  54. Question 54 (2 marks, Multiple choice) – Memory is byte-addressable; PC, PSW and other registers are 2 bytes. An upward-growing stack starts at hexadecimal 0100 and SP points to its top…
  55. Question 55 (2 marks, Numerical answer) – How many minterms remain after minimizing [D+AB+A C+AC D+A C D]?
  56. Question 56 (2 marks, Multiple choice) – Let f(x)=x-1/3 and let A be the area between its graph and the x-axis from −1 to 1. Which are true? I: f is continuous on [−1,1]. II: f is unbounded…
  57. Question 57 (2 marks, Numerical answer) – For M=pmatrix3&4&45\\7&9&105\\13&2&195pmatrix, add the third row to the second, then subtract the third column from the first. Find the resulting…
  58. Question 58 (2 marks, Numerical answer) – How many onto functions map X=1,2,3,4 to Y=a,b,c?
  59. Question 59 (2 marks, Numerical answer) – X and Y contain 2 and 20 distinct objects respectively. Choose uniformly from all functions X→Y. What is the probability that the function is…
  60. Question 60 (2 marks, Multiple choice) – Over 0,1, λ denotes the empty string. A regular grammar satisfies X0=1X1, X1=0X1+1X2, X2=0X1+λ. Which expression denotes X0?
  61. Question 61 (2 marks, Multiple choice) – A self-complementary graph is isomorphic to its complement. What must its vertex count n satisfy?
  62. Question 62 (2 marks, Multiple choice) – A bridge is an edge whose removal disconnects a connected graph. Which is true?
  63. Question 63 (2 marks, Multiple choice) – Which first-order formula is logically valid?
  64. Question 64 (2 marks, Multiple choice) – Which assertion about code inspection and code walkthrough is true?
  65. Question 65 (2 marks, Numerical answer) – A half adder uses XOR and AND gates. A full adder uses two half adders and one OR gate. XOR delay is twice AND/OR delay; AND and OR each take 1.2 μs.…