The GATE Grind

GATE 2018 CS – Previous Year Questions with Solutions

All 65 questions of GATE 2018 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) – "From where are they bringing their books? bringing books from ." The words that best fill the blanks in the above sentence are
  2. Question 2 (1 mark, Multiple choice) – "A investigation can sometimes yield new facts, but typically organized ones are more successful." The word that best fills the blank in the above…
  3. Question 3 (1 mark, Multiple choice) – The area of a square is d. What is the area of the circle which has the diagonal of the square as its diameter?
  4. Question 4 (1 mark, Multiple choice) – What would be the smallest natural number which when divided either by 20 or by 42 or by 76 leaves a remainder of 7 in each case?
  5. Question 5 (1 mark, Multiple choice) – What is the missing number in the following sequence? 2, 12, 60, 240, 720, 1440, , 0
  6. Question 6 (2 marks, Multiple choice) – In appreciation of the social improvements completed in a town, a wealthy philanthropist decided to gift Rs 750 to each male senior citizen in the…
  7. Question 7 (2 marks, Multiple choice) – If pqr0 and p-x=1q, q-y=1r, r-z=1p, what is the value of the product xyz?
  8. Question 8 (2 marks, Multiple choice) – In a party, 60% of the invited guests are male and 40% are female. If 80% of the invited guests attended the party and if all the invited female…
  9. Question 9 (2 marks, Multiple choice) – In the figure below, DEC+ BFC is equal to . (The four options are given in terms of the angles marked in the figure.)
  10. Question 10 (2 marks, Multiple choice) – A six sided unbiased die with four green faces and two red faces is rolled seven times. Which of the following combinations is the most likely outcome…
  11. Question 11 (1 mark, Multiple choice) – Which one of the following is a closed form expression for the generating function of the sequence \a n\, where a n=2n+3 for all n=0,1,2,?
  12. Question 12 (1 mark, Multiple choice) – Consider the following C program. The output of this program is:
  13. Question 13 (1 mark, Multiple choice) – A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let n denote…
  14. Question 14 (1 mark, Multiple choice) – Let and denote the Exclusive OR and Exclusive NOR operations, respectively. Which one of the following is NOT CORRECT?
  15. Question 15 (1 mark, Multiple choice) – Consider the following processor design characteristics. I. Register-to-register arithmetic operations only II. Fixed-length instruction format III.…
  16. Question 16 (1 mark, Multiple choice) – Let N be an NFA with n states. Let k be the number of states of a minimal DFA which is equivalent to N. Which one of the following is necessarily…
  17. Question 17 (1 mark, Multiple choice) – The set of all recursively enumerable languages is
  18. Question 18 (1 mark, Multiple choice) – Which one of the following statements is FALSE?
  19. Question 19 (1 mark, Multiple choice) – The following are some events that occur after a device controller issues an interrupt while process L is under execution. (P) The processor pushes…
  20. Question 20 (1 mark, Multiple choice) – Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the…
  21. Question 21 (1 mark, Multiple choice) – In an Entity-Relationship (ER) model, suppose R is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate…
  22. Question 22 (1 mark, Multiple choice) – Consider the following two tables and four queries in SQL. Book (isbn, bname), Stock (isbn, copies) Query 1: SELECT B.isbn, S.copies FROM Book B INNER…
  23. Question 23 (1 mark, Multiple choice) – Match the following: Field Length in bits --- --- P. UDP Header's Port Number I. 48 Q. Ethernet MAC Address II. 8 R. IPv6 Next Header III. 32 S. TCP…
  24. Question 24 (1 mark, Multiple choice) – Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that cwnd stands for the TCP congestion…
  25. Question 25 (1 mark, Numerical answer) – Two people, P and Q, decide to independently roll two identical dice, each with 6 faces, numbered 1 to 6. The person with the lower number wins. In…
  26. Question 26 (1 mark, Numerical answer) – The value of 0/4x(x2)\,dx correct to three decimal places (assuming that =3.14) is .
  27. Question 27 (1 mark, Numerical answer) – Consider a matrix A=uvT where u=pmatrix1\\2pmatrix, v=pmatrix1\\1pmatrix. Note that vT denotes the transpose of v. The largest eigenvalue of A is .
  28. Question 28 (1 mark, Numerical answer) – The chromatic number of the following graph is .
  29. Question 29 (1 mark, Numerical answer) – Let G be a finite group on 84 elements. The size of a largest possible proper subgroup of G is .
  30. Question 30 (1 mark, Numerical answer) – The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the same tree is 8,6,9,4,7,2,5,1,3. The height of a tree is…
  31. Question 31 (1 mark, Numerical answer) – Consider the following C program: The output of this program is .
  32. Question 32 (1 mark, Numerical answer) – Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops (a serial chain with input…
  33. Question 33 (1 mark, Numerical answer) – A 32-bit wide main memory unit with a capacity of 1 GB is built using 256M 4-bit DRAM chips. The number of rows of memory cells in the DRAM chip is…
  34. Question 34 (1 mark, Numerical answer) – Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource…
  35. Question 35 (1 mark, Numerical answer) – Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (=109 bits-per-second). The session starts with a sequence number of 1234.…
  36. Question 36 (2 marks, Multiple choice) – Consider a matrix P whose only eigenvectors are the multiples of bmatrix1\\4bmatrix. Consider the following statements. (I) P does not have an inverse…
  37. Question 37 (2 marks, Multiple choice) – Let N be the set of natural numbers. Consider the following sets. P: Set of Rational numbers (positive and negative) Q: Set of functions from \0,1\ to…
  38. Question 38 (2 marks, Multiple choice) – Consider the first-order logic sentence s\, t\, u\, v\, w\, x\, y\ (s,t,u,v,w,x,y) where (s,t,u,v,w,x,y) is a quantifier-free first-order logic…
  39. Question 39 (2 marks, Multiple choice) – Consider the following C program: The output of the program above is
  40. Question 40 (2 marks, Multiple choice) – Let G be a simple undirected graph. Let T D be a depth first search tree of G. Let T B be a breadth first search tree of G. Consider the following…
  41. Question 41 (2 marks, Multiple choice) – Assume that multiplying a matrix G 1 of dimension p q with another matrix G 2 of dimension q r requires pqr scalar multiplications. Computing the…
  42. Question 42 (2 marks, Multiple choice) – Consider the following C code. Assume that `unsigned long int` type length is 64 bits. The value returned when we call `fun` with the input 240 is
  43. Question 43 (2 marks, Multiple choice) – Consider the unsigned 8-bit fixed point binary number representation below, b 7b 6b 5b 4b 3.b 2b 1b 0 where the position of the binary point is…
  44. Question 44 (2 marks, Multiple choice) – The size of the physical address space of a processor is 2P bytes. The word length is 2W bytes. The capacity of cache memory is 2N bytes. The size of…
  45. Question 45 (2 marks, Multiple choice) – Consider the following languages: I. \ambncpdq m+p=n+q,\ where m,n,p,q0\ II. \ambncpdq m=n and p=q,\ where m,n,p,q0\ III. \ambncpdq m=n=p and p q,\…
  46. Question 46 (2 marks, Multiple choice) – Consider the following problems. L(G) denotes the language generated by a grammar G. L(M) denotes the language accepted by a machine M. (I) For an…
  47. Question 47 (2 marks, Multiple choice) – A lexical analyzer uses the following patterns to recognize three tokens T 1, T 2, and T 3 over the alphabet \a,b,c\. T 1: a?(b c)*a T 2: b?(a c)*b T…
  48. Question 48 (2 marks, Multiple choice) – Consider the following parse tree for the expression `a#b\c\d#e#f`, involving two binary operators `\` and `#`. Which one of the following is correct…
  49. Question 49 (2 marks, Multiple choice) – In a system, there are three types of resources: E, F and G. Four processes P 0, P 1, P 2 and P 3 execute concurrently. At the outset, the processes…
  50. Question 50 (2 marks, Multiple choice) – Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is N. Three semaphores empty, full and mutex…
  51. Question 51 (2 marks, Multiple choice) – Consider the relations r(A,B) and s(B,C), where s.B is a primary key and r.B is a foreign key referencing s.B. Consider the query Q:\ r( B<5(s)) Let…
  52. Question 52 (2 marks, Multiple choice) – Consider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the…
  53. Question 53 (2 marks, Numerical answer) – Let G be a graph with 100! vertices, with each vertex labelled by a distinct permutation of the numbers 1,2,,100. There is an edge between vertices u…
  54. Question 54 (2 marks, Numerical answer) – Consider Guwahati (G) and Delhi (D) whose temperatures can be classified as high (H), medium (M) and low (L). Let P(H G) denote the probability that…
  55. Question 55 (2 marks, Numerical answer) – Consider the following program written in pseudo-code. Assume that `x` and `y` are integers. The number of times that the `print` statement is…
  56. Question 56 (2 marks, Numerical answer) – The number of possible min-heaps containing each value from \1,2,3,4,5,6,7\ exactly once is .
  57. Question 57 (2 marks, Numerical answer) – Consider the following undirected graph G (the edge weights are shown in the figure, with one edge of unknown weight x): Choose a value for x that…
  58. Question 58 (2 marks, Numerical answer) – Consider the weights and values of items listed below. Note that there is only one unit of each item. Item number Weight (in Kgs) Value (in Rupees)…
  59. Question 59 (2 marks, Numerical answer) – Consider the minterm list form of a Boolean function F given below. F(P,Q,R,S)= m(0,2,5,7,9,11)+d(3,8,10,12,14) Here, m denotes a minterm and d…
  60. Question 60 (2 marks, Numerical answer) – The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform…
  61. Question 61 (2 marks, Numerical answer) – A processor has 16 integer registers (R0, R1, ..., R15) and 64 floating point registers (F0, F1, ..., F63). It uses a 2-byte instruction format. There…
  62. Question 62 (2 marks, Numerical answer) – Given a language L, define Li as follows: L0=\\ and Li=Li-1 L for all i>0. The order of a language L is defined as the smallest k such that Lk=Lk+1.…
  63. Question 63 (2 marks, Numerical answer) – Consider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders (numbered as 0, 1, ..., 199), and 256 sectors per track (numbered…
  64. Question 64 (2 marks, Numerical answer) – Consider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header and a 40-byte TCP header. The packet is forwarded to an IPv4…
  65. Question 65 (2 marks, Numerical answer) – Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the…