The GATE Grind

GATE 2020 CS – Previous Year Questions with Solutions

All 65 questions of GATE 2020 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) – Raman is confident of speaking English six months as he has been practising regularly the last three weeks.
  2. Question 2 (1 mark, Multiple choice) – His knowledge of the subject was excellent but his classroom performance was .
  3. Question 3 (1 mark, Multiple choice) – Select the word that fits the analogy: Cook : Cook :: Fly :
  4. Question 4 (1 mark, Multiple choice) – The dawn of the 21st century witnessed the melting glaciers oscillating between giving too much and too little to billions of people who depend on…
  5. Question 5 (1 mark, Multiple choice) – There are multiple routes to reach from node 1 to node 2, as shown in the network. [Figure: edge costs 1→a 200, 1→b 300, 1→f 100, a→c 100, a→2 200,…
  6. Question 6 (2 marks, Multiple choice) – Goods and Services Tax (GST) is an indirect tax introduced in India in 2017 that is imposed on the supply of goods and services, and it subsumes all…
  7. Question 7 (2 marks, Multiple choice) – If P = 3, R = 27, T = 243, then Q + S = .
  8. Question 8 (2 marks, Multiple choice) – The figure below shows an annular ring with outer and inner radii as b and a, respectively. The annular space has been painted in the form of blue…
  9. Question 9 (2 marks, Multiple choice) – Two straight lines are drawn perpendicular to each other in X-Y plane. If and are the acute angles the straight lines make with the X-axis, then + is…
  10. Question 10 (2 marks, Multiple choice) – The total revenue of a company during 2014-2018 is shown in the bar graph. If the total expenditure of the company in each year is 500 million rupees,…
  11. Question 11 (1 mark, Multiple choice) – Consider the functions I. e-x II. x2- x III. x3+1 Which of the above functions is/are increasing everywhere in [0,1]?
  12. Question 12 (1 mark, Multiple choice) – For parameters a and b, both of which are (1), T(n)=T(n1/a)+1, and T(b)=1. Then T(n) is
  13. Question 13 (1 mark, Multiple choice) – Consider the following statements. I. Daisy chaining is used to assign priorities in attending interrupts. II. When a device raises a vectored…
  14. Question 14 (1 mark, Multiple choice) – Consider the following data path diagram. [Figure: single-bus data path with MAR, MDR, IR, PC, register file R0-R7, TEMP1, TEMP2 and ALU] Consider an…
  15. Question 15 (1 mark, Multiple choice) – The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?
  16. Question 16 (1 mark, Multiple choice) – What is the worst case time complexity of inserting n2 elements into an AVL-tree with n elements initially?
  17. Question 17 (1 mark, Multiple choice) – Which one of the following regular expressions represents the set of all binary strings with an odd number of 1's?
  18. Question 18 (1 mark, Multiple choice) – Consider the following statements. I. If L 1 L 2 is regular, then both L 1 and L 2 must be regular. II. The class of regular languages is closed under…
  19. Question 19 (1 mark, Multiple choice) – Consider the following statements. I. Symbol table is accessed only during lexical analysis and syntax analysis. II. Compilers for programming…
  20. Question 20 (1 mark, Multiple choice) – Consider the language L=\an n 0\\anbn n 0\ and the following statements. I. L is deterministic context-free. II. L is context-free but not…
  21. Question 21 (1 mark, Multiple choice) – Consider allocation of memory to a new process. Assume that none of the existing holes in the memory will exactly fit the process's memory…
  22. Question 22 (1 mark, Multiple choice) – Consider the following statements about process state transitions for a system using preemptive scheduling. I. A running process can move to ready…
  23. Question 23 (1 mark, Multiple choice) – Consider a relational database containing the following schemas. Catalogue(sno, pno, cost): (S1,P1,150), (S1,P2,50), (S1,P3,100), (S2,P4,200),…
  24. Question 24 (1 mark, Multiple choice) – Which one of the following is used to represent the supporting many-one relationships of a weak entity set in an entity-relationship diagram?
  25. Question 25 (1 mark, Multiple choice) – Consider the following statements about the functionality of an IP based router. I. A router does not modify the IP packets during forwarding. II. It…
  26. Question 26 (1 mark, Multiple choice) – What is the worst case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order?
  27. Question 27 (1 mark, Numerical answer) – Let R be the set of all binary relations on the set \1,2,3\. Suppose a relation is chosen from R at random. The probability that the chosen relation…
  28. Question 28 (1 mark, Numerical answer) – Let G be a group of 35 elements. Then the largest possible size of a subgroup of G other than G itself is .
  29. Question 29 (1 mark, Numerical answer) – A multiplexer is placed between a group of 32 registers and an accumulator to regulate data movement such that at any given point in time the content…
  30. Question 30 (1 mark, Numerical answer) – If there are m input lines and n output lines for a decoder that is used to uniquely address a byte addressable 1 KB RAM, then the minimum value of…
  31. Question 31 (1 mark, Numerical answer) – A direct mapped cache memory of 1 MB has a block size of 256 bytes. The cache has an access time of 3 ns and a hit rate of 94%. During a cache miss,…
  32. Question 32 (1 mark, Numerical answer) – Consider the following C program. The output of the program is .
  33. Question 33 (1 mark, Numerical answer) – Consider a double hashing scheme in which the primary hash function is h 1(k)=k 23, and the secondary hash function is h 2(k)=1+(k 19). Assume that…
  34. Question 34 (1 mark, Numerical answer) – Consider the following grammar. S aSB d B b The number of reduction steps taken by a bottom-up parser while accepting the string aaadbbb is .
  35. Question 35 (1 mark, Numerical answer) – Assume that you have made a request for a web page through your web browser to a web server. Initially the browser cache is empty. Further, the…
  36. Question 36 (2 marks, Multiple choice) – Which of the following languages are undecidable? Note that M indicates encoding of the Turing machine M. L 1=\ M L(M)=\ L 2=\ M,w,q M on input w…
  37. Question 37 (2 marks, Multiple choice) – Let A and B be two n n matrices over real numbers. Let rank(M) and (M) denote the rank and determinant of a matrix M, respectively. Consider the…
  38. Question 38 (2 marks, Multiple choice) – Consider the Boolean function z(a,b,c). [Figure: z is the output of an OR gate whose inputs are a and the output of an AND gate with inputs b (b…
  39. Question 39 (2 marks, Multiple choice) – Consider three registers R1, R2, and R3 that store numbers in IEEE-754 single precision floating point format. Assume that R1 and R2 contain the…
  40. Question 40 (2 marks, Multiple choice) – A computer system with a word length of 32 bits has a 16 MB byte-addressable main memory and a 64 KB, 4-way set associative cache memory with a block…
  41. Question 41 (2 marks, Multiple choice) – Let G=(V,E) be a weighted undirected graph and let T be a Minimum Spanning Tree (MST) of G maintained using adjacency lists. Suppose a new weighted…
  42. Question 42 (2 marks, Multiple choice) – Consider the following languages. L 1=\wxyx w,x,y(0+1)+\ L 2=\xy x,y(a+b)*, x = y , x y\ Which one of the following is TRUE?
  43. Question 43 (2 marks, Multiple choice) – Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X, and Y has two attributes: s is a synthesized attribute, and i…
  44. Question 44 (2 marks, Multiple choice) – Each of a set of n processes executes the following code using two semaphores a and b initialized to 1 and 0, respectively. Assume that count is a…
  45. Question 45 (2 marks, Multiple choice) – Consider the following five disk access requests of the form (request id, cylinder number) that are present in the disk scheduler queue at a given…
  46. Question 46 (2 marks, Multiple choice) – Consider a relational table R that is in 3NF, but not in BCNF. Which one of the following statements is TRUE?
  47. Question 47 (2 marks, Multiple choice) – Consider a schedule of transactions T 1 and T 2. In time order (RX = Read(X), WX = Write(X)): T1:RA, T2:RB, T2:WB, T1:RC, T2:RD, T1:WD, T2:WC, T1:WB,…
  48. Question 48 (2 marks, Multiple choice) – An organization requires a range of IP addresses to assign one to each of its 1500 computers. The organization has approached an Internet Service…
  49. Question 49 (2 marks, Multiple choice) – Which one of the following predicate formulae is NOT logically valid? Note that W is a predicate formula without any free occurrence of x.
  50. Question 50 (2 marks, Multiple choice) – Let G=(V,E) be a directed, weighted graph with weight function w:ER. For some function f:VR, for each edge (u,v) E, define w'(u,v) as…
  51. Question 51 (2 marks, Multiple choice) – In a balanced binary search tree with n elements, what is the worst case time complexity of reporting all elements in range [a,b]? Assume that the…
  52. Question 52 (2 marks, Numerical answer) – The number of permutations of the characters in LILAC so that no character appears in its original position, if the two L's are indistinguishable, is…
  53. Question 53 (2 marks, Numerical answer) – Consider a non-pipelined processor operating at 2.5 GHz. It takes 5 clock cycles to complete an instruction. You are going to make a 5-stage pipeline…
  54. Question 54 (2 marks, Numerical answer) – A processor has 64 registers and uses 16-bit instruction format. It has two types of instructions: I-type and R-type. Each I-type instruction contains…
  55. Question 55 (2 marks, Numerical answer) – For n>2, let a\0,1\n be a non-zero vector. Suppose that x is chosen uniformly at random from \0,1\n. Then, the probability that i=1na ix i is an odd…
  56. Question 56 (2 marks, Numerical answer) – Consider the following C functions. The return value of fun2(5) is .
  57. Question 57 (2 marks, Numerical answer) – Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the…
  58. Question 58 (2 marks, Numerical answer) – Consider the following C functions. The value returned by pp(3,4) is .
  59. Question 59 (2 marks, Numerical answer) – Consider a graph G=(V,E), where V=\v 1,v 2,,v 100\, E=\(v i,v j) 1 i<j 100\, and weight of the edge (v i,v j) is i-j . The weight of minimum spanning…
  60. Question 60 (2 marks, Numerical answer) – Consider the following set of processes, assumed to have arrived at time 0. Consider the CPU scheduling algorithms Shortest Job First (SJF) and Round…
  61. Question 61 (2 marks, Numerical answer) – Consider the following language. L=\x\a,b\* number of a's in x is divisible by 2 but not divisible by 3\ The minimum number of states in a DFA that…
  62. Question 62 (2 marks, Numerical answer) – Graph G is obtained by adding vertex s to K 3,4 and making s adjacent to every vertex of K 3,4. The minimum number of colours required to edge-colour…
  63. Question 63 (2 marks, Numerical answer) – Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns…
  64. Question 64 (2 marks, Numerical answer) – Consider a database implemented using B+ tree for file indexing and installed on a disk drive with block size of 4 KB. The size of search key is 12…
  65. Question 65 (2 marks, Numerical answer) – Consider a TCP connection between a client and a server with the following specifications: the round trip time is 6 ms, the size of the receiver…