The GATE Grind

GATE 2019 CS – Previous Year Questions with Solutions

All 65 questions of GATE 2019 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) – The expenditure on the project as follows: equipment Rs.20 lakhs, salaries Rs.12 lakhs, and contingency Rs.3 lakhs.
  2. Question 2 (1 mark, Multiple choice) – The search engine's business model around the fulcrum of trust.
  3. Question 3 (1 mark, Multiple choice) – Two cars start at the same time from the same location and go in the same direction. The speed of the first car is 50 km/h and the speed of the second…
  4. Question 4 (1 mark, Multiple choice) – Ten friends planned to share equally the cost of buying a gift for their teacher. When two of them decided not to contribute, each of the other…
  5. Question 5 (1 mark, Multiple choice) – A court is to a judge as is to a teacher.
  6. Question 6 (2 marks, Multiple choice) – The police arrested four criminals – P, Q, R and S. The criminals knew each other. They made the following statements: P says "Q committed the crime."…
  7. Question 7 (2 marks, Multiple choice) – In the given diagram, teachers are represented in the triangle, researchers in the circle and administrators in the rectangle. Out of the total number…
  8. Question 8 (2 marks, Multiple choice) – "A recent High Court judgement has sought to dispel the idea of begging as a disease — which leads to its stigmatization and criminalization — and to…
  9. Question 9 (2 marks, Multiple choice) – In a college, there are three student clubs. Sixty students are only in the Drama club, 80 students are only in the Dance club, 30 students are only…
  10. Question 10 (2 marks, Multiple choice) – Three of the five students allocated to a hostel put in special requests to the warden. Given the floor plan, select the allocation plan that will…
  11. Question 11 (1 mark, Multiple choice) – A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable…
  12. Question 12 (1 mark, Multiple choice) – The chip select logic for a certain DRAM chip in a memory system design is shown below. Assume that the memory system has 16 address lines denoted by…
  13. Question 13 (1 mark, Multiple choice) – Which one of the following kinds of derivation is used by LR parsers?
  14. Question 14 (1 mark, Multiple choice) – In 16-bit 2's complement representation, the decimal number -28 is:
  15. Question 15 (1 mark, Multiple choice) – Let U=\1,2,,n\. Let A=\(x,X) x X,\ X U\. Consider the following two statements on A . I. A =n2n-1 II. A = k=1nk nk Which of the above statements…
  16. Question 16 (1 mark, Multiple choice) – Which one of the following is NOT a valid identity?
  17. Question 17 (1 mark, Multiple choice) – If L is a regular language over = a,b , which one of the following languages is NOT regular?
  18. Question 18 (1 mark, Multiple choice) – Consider Z=X-Y, where X, Y and Z are all in sign-magnitude form. X and Y are each represented in n bits. To avoid overflow, the representation of Z…
  19. Question 19 (1 mark, Multiple choice) – Let X be a square matrix. Consider the following two statements on X. I. X is invertible. II. Determinant of X is non-zero. Which one of the following…
  20. Question 20 (1 mark, Multiple choice) – Let G be an arbitrary group. Consider the following relations on G: R 1: a,b G, a\,R 1\,b if and only if g G such that a=g-1bg R 2: a,b G, a\,R 2\,b…
  21. Question 21 (1 mark, Multiple choice) – Consider the following two statements about database transaction schedules: I. Strict two-phase locking protocol generates conflict serializable…
  22. Question 22 (1 mark, Multiple choice) – Let G be an undirected complete graph on n vertices, where n>2. Then the number of different Hamiltonian cycles in G is equal to
  23. Question 23 (1 mark, Multiple choice) – Compute x3x4-812x2-5x-3
  24. Question 24 (1 mark, Multiple choice) – Which one of the following statements is NOT correct about the B+ tree data structure used for creating an index of a relational database table?
  25. Question 25 (1 mark, Multiple choice) – For =\a,b\, let us consider the regular language L=\x x=a2+3k or x=b10+12k,\ k0\. Which one of the following can be a pumping length (the constant…
  26. Question 26 (1 mark, Multiple choice) – Which one of the following protocol pairs can be used to send and retrieve e-mails (in that order)?
  27. Question 27 (1 mark, Numerical answer) – The following C program is executed on a Unix/Linux system: The total number of child processes created is .
  28. Question 28 (1 mark, Numerical answer) – Consider the following C program: The value printed by the program is .
  29. Question 29 (1 mark, Numerical answer) – Consider the grammar given below: S → Aa A → BD B → b ε D → d ε Let a, b, d, and \ be indexed as follows: a b d \ --- --- --- --- 3 2 1 0 Compute the…
  30. Question 30 (1 mark, Numerical answer) – An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that…
  31. Question 31 (1 mark, Numerical answer) – The value of 351 mod 5 is .
  32. Question 32 (1 mark, Numerical answer) – Two numbers are chosen independently and uniformly at random from the set \1,2,,13\. The probability (rounded off to 3 decimal places) that their…
  33. Question 33 (1 mark, Numerical answer) – Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100. P1 P2 P3 --- ---…
  34. Question 34 (1 mark, Numerical answer) – Consider the following C program: The number that will be displayed on execution of the program is .
  35. Question 35 (1 mark, Numerical answer) – Consider a sequence of 14 elements: A=[-5,-10,6,3,-1,-2,13,4,-9,-1,4,12,-3,0]. The subsequence sum S(i,j)= k=ijA[k]. Determine the maximum of S(i,j),…
  36. Question 36 (2 marks, Multiple choice) – Consider the following C function. Which one of the following will happen when the function `convert` is called with any positive integer n as…
  37. Question 37 (2 marks, Multiple choice) – Consider the following C program: Which one of the following values will be displayed on execution of the programs?
  38. Question 38 (2 marks, Multiple choice) – Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252…
  39. Question 39 (2 marks, Multiple choice) – Suppose in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following…
  40. Question 40 (2 marks, Multiple choice) – Consider three 4-variable functions f 1, f 2, and f 3, which are expressed in sum-of-minterms as f 1=(0,2,5,8,14), f 2=(2,3,6,8,14,15), f…
  41. Question 41 (2 marks, Multiple choice) – Which one of the following languages over =\a,b\ is NOT context-free?
  42. Question 42 (2 marks, Multiple choice) – Let the set of functional dependencies F=\QR S,\ R P,\ S Q\ hold on a relation schema X=(PQRS). X is not in BCNF. Suppose X is decomposed into two…
  43. Question 43 (2 marks, Multiple choice) – Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable.…
  44. Question 44 (2 marks, Multiple choice) – Consider the following sets: S1. Set of all recursively enumerable languages over the alphabet 0,1 S2. Set of all syntactically valid C programs S3.…
  45. Question 45 (2 marks, Multiple choice) – Consider the first order predicate formula : x[( z\ z x((z=x)(z=1))) w\,(w>x)( z\ z w((w=z)(z=1)))] Here 'a b' denotes that 'a divides b', where a and…
  46. Question 46 (2 marks, Multiple choice) – Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let X 1, X 2, X 3, X 4, X 5, and X 6 be…
  47. Question 47 (2 marks, Multiple choice) – There are n unsorted arrays: A 1,A 2,,A n. Assume that n is odd. Each of A 1,A 2,,A n contains n distinct elements. There are no common elements…
  48. Question 48 (2 marks, Multiple choice) – Let G be any connected, weighted, undirected graph. I. G has a unique minimum spanning tree, if no two edges of G have the same weight. II. G has a…
  49. Question 49 (2 marks, Multiple choice) – Consider the following snapshot of a system running n concurrent processes. Process i is holding X i instances of a resource R, 1 i n. Assume that all…
  50. Question 50 (2 marks, Multiple choice) – Consider the following statements: I. The smallest element in a max-heap is always at a leaf node II. The second largest element in a max-heap is…
  51. Question 51 (2 marks, Numerical answer) – Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below: Process P1…
  52. Question 52 (2 marks, Numerical answer) – The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB,…
  53. Question 53 (2 marks, Numerical answer) – Consider the augmented grammar given below: S' → S S → ⟨L⟩ id L → L,S S Let I 0=CLOSURE(\[S' S]\). The number of items in the set GOTO(I 0,) is:…
  54. Question 54 (2 marks, Numerical answer) – Consider the following matrix: R=bmatrix1&2&4&8\\1&3&9&27\\1&4&16&64\\1&5&25&125bmatrix The absolute value of the product of Eigen values of R is .
  55. Question 55 (2 marks, Numerical answer) – A certain processor deploys a single-level cache. The cache block size is 8 words and the word size is 4 bytes. The memory system uses a 60-MHz clock.…
  56. Question 56 (2 marks, Numerical answer) – Let T be a full binary tree with 8 leaves. (A full binary tree has every level full.) Suppose two leaves a and b of T are chosen uniformly and…
  57. Question 57 (2 marks, Numerical answer) – Suppose Y is distributed uniformly in the open interval (1,6). The probability that the polynomial 3x2+6xY+3Y+6 has only real roots is (rounded off to…
  58. Question 58 (2 marks, Numerical answer) – Let be the set of all bijections from \1,,5\ to \1,,5\, where id denotes the identity function, i.e. id(j)=j, j. Let denote composition on functions.…
  59. Question 59 (2 marks, Numerical answer) – Consider that 15 machines need to be connected in a LAN using 8-port Ethernet switches. Assume that these switches do not have any separate uplink…
  60. Question 60 (2 marks, Numerical answer) – What is the minimum number of 2-input NOR gates required to implement a 4-variable function expressed in sum-of-minterms form as…
  61. Question 61 (2 marks, Numerical answer) – A relational database contains two tables Student and Performance as shown below: Roll no. Student name --- --- 1 Amit 2 Priya 3 Vinit 4 Rohan 5 Smita…
  62. Question 62 (2 marks, Numerical answer) – Consider the following C program: The number of times the variable sum will be printed, when the above program is executed, is .
  63. Question 63 (2 marks, Numerical answer) – Consider the following C program: The output of the above C program is .
  64. Question 64 (2 marks, Numerical answer) – In an RSA cryptosystem, the value of the public modulus parameter n is 3007. If it is also known that (n)=2880, where () denotes Euler's Totient…
  65. Question 65 (2 marks, Numerical answer) – Consider the following relations P(X,Y,Z), Q(X,Y,T) and R(Y,V). X Y Z --- --- --- X1 Y1 Z1 X1 Y1 Z2 X2 Y2 Z2 X2 Y4 Z4 (relation P) X Y T --- --- ---…