The GATE Grind

GATE 2015 CS – Previous Year Questions with Solutions

All 65 questions of GATE 2015 CS 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) – Didn't you buy when you went shopping?
  2. Question 2 (1 mark, Multiple choice) – Which of the following options is the closest in meaning to the sentence below? She enjoyed herself immensely at the party.
  3. Question 3 (1 mark, Multiple choice) – Which one of the following combinations is incorrect?
  4. Question 4 (1 mark, Multiple choice) – Based on the given statements, select the most appropriate option to solve the given question. If two floors in a certain building are 9 feet apart,…
  5. Question 5 (1 mark, Multiple choice) – Given Set A = \2, 3, 4, 5\ and Set B = \11, 12, 13, 14, 15\, two numbers are randomly selected, one from each set. What is the probability that the…
  6. Question 6 (2 marks, Multiple choice) – Select the alternative meaning of the underlined part of the sentence. The chain snatchers took to their heels when the police party arrived.
  7. Question 7 (2 marks, Multiple choice) – The given statement is followed by some courses of action. Assuming the statement to be true, decide the correct option. Statement: There has been a…
  8. Question 8 (2 marks, Numerical answer) – The pie chart below has the breakup of the number of students from different departments in an engineering college for the year 2012. The proportion…
  9. Question 9 (2 marks, Multiple choice) – The probabilities that a student passes in Mathematics, Physics and Chemistry are m, p, and c respectively. Of these subjects, the student has 75%…
  10. Question 10 (2 marks, Multiple choice) – The number of students in a class who have answered correctly, wrongly, or not attempted each question in an exam, are listed in the table below. The…
  11. Question 11 (1 mark, Multiple choice) – If g(x) = 1 - x and h(x) = xx-1, then g(h(x))h(g(x)) is:
  12. Question 12 (1 mark, Multiple choice) – x x1/x is
  13. Question 13 (1 mark, Multiple choice) – Match the following: (P) Prim's algorithm for minimum spanning tree (Q) Floyd-Warshall algorithm for all pairs shortest paths (R) Mergesort (S)…
  14. Question 14 (1 mark, Multiple choice) – Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n ( 2) numbers? In the…
  15. Question 15 (1 mark, Multiple choice) – The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
  16. Question 16 (1 mark, Multiple choice) – Match the following: (P) Condition coverage (Q) Equivalence class partitioning (R) Volume testing (S) Alpha testing (i) Black-box testing (ii) System…
  17. Question 17 (1 mark, Multiple choice) – Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)? I. 3, 5, 7, 8, 15, 19, 25 II. 5, 8, 9, 12, 10, 15, 25…
  18. Question 18 (1 mark, Multiple choice) – Which one of the following is TRUE at any valid state in shift-reduce parsing?
  19. Question 19 (1 mark, Multiple choice) – Which one of the following is NOT equivalent to p q?
  20. Question 20 (1 mark, Multiple choice) – For a set A, the power set of A is denoted by 2A. If A = \5, \6\, \7\\, which of the following options are TRUE? I. 2A II. 2A III. \5, \6\\ 2A IV. \5,…
  21. Question 21 (1 mark, Multiple choice) – Consider a 4-bit Johnson counter with an initial value of 0000. The counting sequence of this counter is
  22. Question 22 (1 mark, Multiple choice) – For computers based on three-address instruction formats, each address field can be used to specify which of the following: (S1) A memory operand (S2)…
  23. Question 23 (1 mark, Multiple choice) – Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection? I.…
  24. Question 24 (1 mark, Multiple choice) – Suppose that everyone in a group of N people wants to communicate secretly with the N-1 others using symmetric key cryptographic system. The…
  25. Question 25 (1 mark, Multiple choice) – Which of the following statements is/are FALSE? I. XML overcomes the limitations in HTML to support a structured way of organizing content. II. XML…
  26. Question 26 (1 mark, Multiple choice) – Which one of the following fields of an IP header is NOT modified by a typical IP router?
  27. Question 27 (1 mark, Multiple choice) – In one of the pairs of protocols given below, both the protocols can use multiple TCP connections between the same client and the server. Which one is…
  28. Question 28 (1 mark, Multiple choice) – For any two languages L 1 and L 2 such that L 1 is context-free and L 2 is recursively enumerable but not recursive, which of the following is/are…
  29. Question 29 (1 mark, Numerical answer) – Consider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the…
  30. Question 30 (1 mark, Numerical answer) – The following two functions `P1` and `P2` that share a variable `B` with an initial value of 2 execute concurrently. The number of distinct values…
  31. Question 31 (1 mark, Multiple choice) – SELECT operation in SQL is equivalent to
  32. Question 32 (1 mark, Multiple choice) – A file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index. Then that index is…
  33. Question 33 (1 mark, Numerical answer) – In the LU decomposition of the matrix bmatrix 2 & 2 \\ 4 & 9 bmatrix, if the diagonal elements of U are both 1, then the lower diagonal entry l 22 of…
  34. Question 34 (1 mark, Numerical answer) – The output of the following C program is .
  35. Question 35 (1 mark, Multiple choice) – What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
  36. Question 36 (2 marks, Numerical answer) – Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that…
  37. Question 37 (2 marks, Multiple choice) – Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4. Array Index 1 2 3 4 5 6 7 8 9 --- --- --- --- --- --- --- --- --- ---…
  38. Question 38 (2 marks, Numerical answer) – Consider the following C program segment. The cyclomatic complexity of the program segment is .
  39. Question 39 (2 marks, Numerical answer) – Consider a LAN with four nodes S 1, S 2, S 3 and S 4. Time is divided into fixed-size slots, and a node can begin its transmission only at the…
  40. Question 40 (2 marks, Multiple choice) – The binary operator is defined by the following truth table. p q p q --- --- --- 0 0 0 0 1 1 1 0 1 1 1 0 Which one of the following is true about the…
  41. Question 41 (2 marks, Numerical answer) – x=199 1x(x+1) = .
  42. Question 42 (2 marks, Multiple choice) – Suppose L = \p, q, r, s, t\ is a lattice represented by the following Hasse diagram: [Hasse diagram: p is the bottom, t is the top, and q, r, s are…
  43. Question 43 (2 marks, Multiple choice) – Consider the operations f(X, Y, Z) = X'YZ + XY' + Y'Z' and g(X, Y, Z) = X'YZ + X'YZ' + XY. Which one of the following is correct?
  44. Question 44 (2 marks, Numerical answer) – Let G be a connected planar graph with 10 vertices. If the number of edges on each face is three, then the number of edges in G is .
  45. Question 45 (2 marks, Multiple choice) – Let a n represent the number of bit strings of length n containing two consecutive 1s. What is the recurrence relation for a n?
  46. Question 46 (2 marks, Multiple choice) – A variable x is said to be live at a statement S i in a program if the following three conditions hold simultaneously: i. There exists a statement S j…
  47. Question 47 (2 marks, Numerical answer) – The least number of temporary variables required to create a three-address code in static single assignment form for the expression q + r/3 + s - t *…
  48. Question 48 (2 marks, Numerical answer) – Consider an Entity-Relationship (ER) model in which entity sets E 1 and E 2 are connected by an m : n relationship R 12. E 1 and E 3 are connected by…
  49. Question 49 (2 marks, Numerical answer) – [Two DFAs, each with two states. DFA M: the start state loops on b, reads a to move to the final state, the final state loops on a and reads b to…
  50. Question 50 (2 marks, Multiple choice) – Consider the NPDA Q = \q 0, q 1, q 2\, = \0, 1\, = \0, 1, \, , q 0, , F = \q 2\ , where (as per usual convention) Q is the set of states, is the input…
  51. Question 51 (2 marks, Multiple choice) – Let G = (V, E) be a simple undirected graph, and s be a particular vertex in it called the source. For x V, let d(x) denote the shortest distance in G…
  52. Question 52 (2 marks, Numerical answer) – Consider a uniprocessor system executing three tasks T 1, T 2 and T 3, each of which is composed of an infinite sequence of jobs (or instances) which…
  53. Question 53 (2 marks, Multiple choice) – A positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flip-flop as follows. The Q output of the D flip-flop is connected…
  54. Question 54 (2 marks, Numerical answer) – Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and…
  55. Question 55 (2 marks, Numerical answer) – Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a…
  56. Question 56 (2 marks, Numerical answer) – Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the…
  57. Question 57 (2 marks, Multiple choice) – Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of…
  58. Question 58 (2 marks, Numerical answer) – 1/2/ (1/x)x2 \, dx = .
  59. Question 59 (2 marks, Multiple choice) – Consider the following 2 2 matrix A where two elements are unknown and are marked by a and b. The eigenvalues of this matrix are -1 and 7. What are…
  60. Question 60 (2 marks, Multiple choice) – An algorithm performs ( N)1/2 find operations, N insert operations, ( N)1/2 delete operations, and ( N)1/2 decrease-key operations on a set of data…
  61. Question 61 (2 marks, Numerical answer) – Consider the following relations: Student Roll No Student Name --- --- 1 Raj 2 Rohit 3 Raj Performance Roll No Course Marks --- --- --- 1 Math 80 1…
  62. Question 62 (2 marks, Multiple choice) – What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory.
  63. Question 63 (2 marks, Numerical answer) – The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: \(A, C),…
  64. Question 64 (2 marks, Multiple choice) – Consider the following C function. Which one of the following most closely approximates the return value of the function `fun1`?
  65. Question 65 (2 marks, Multiple choice) – Consider the following pseudo code, where x and y are positive integers. The post condition that needs to be satisfied after the program terminates is