The GATE Grind

GATE 2026 CS (CS1) – Previous Year Questions with Solutions

All 65 questions of GATE 2026 CS (CS1) 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 antonym of the word protagonist is .
  2. Question 2 (1 mark, Multiple choice) – The figure shows two 4-tile patterns (a 2x2 square tile and an L-tromino with an extra corner tile). Either one or both of the patterns can be used…
  3. Question 3 (1 mark, Multiple choice) – Consider a knock-out women’s badminton singles tournament where there are no ties. The loser in each game is eliminated from the tournament. Every…
  4. Question 4 (1 mark, Multiple choice) – A student needs to enroll for a minimum of 60 credits. A student cannot enroll for more than 70 credits. The credits are divided amongst project and…
  5. Question 5 (1 mark, Multiple choice) – ‘When the teacher is in the room, all students stand silently.’ If the above statement is true, which one of the following statements is not…
  6. Question 6 (2 marks, Multiple choice) – Combinatorics deals with problems involving counting. For example, “How many distinct arrangements of N distinct objects in M spaces on a circle are…
  7. Question 7 (2 marks, Multiple choice) – In Panel I of the figure below, the front view and top view of a structure are shown. Which one of the 3D structures shown in Panel II possesses the…
  8. Question 8 (2 marks, Multiple choice) – For positive real numbers S and K, the function H K(S) is defined as H K(S) = (S - K, 0). The graph below shows the plot of a function N(S) versus S,…
  9. Question 9 (2 marks, Multiple choice) – In the 2020 summer Olympics’ Javelin throw finals, Neeraj Chopra exhibited a spectacular performance to win the gold medal. The silver medal was won…
  10. Question 10 (2 marks, Multiple choice) – An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice in succession and the number on the top face is…
  11. Question 11 (1 mark, Multiple choice) – An urn contains one red ball and one blue ball. At each step, a ball is picked uniformly at random from the urn, and this ball together with another…
  12. Question 12 (1 mark, Multiple choice) – Consider 4 4 matrices with their elements from \0, 1\. The number of such matrices with even number of 1s in every row and every column is
  13. Question 13 (1 mark, Multiple choice) – For n > 1, the maximum multiplicity of any eigenvalue of an n n matrix with elements from R is
  14. Question 14 (1 mark, Multiple choice) – Match each addressing mode in List I with a data element or an element of a data structure (in a high-level language) in List II: List I: P. Immediate…
  15. Question 15 (1 mark, Multiple choice) – Consider a processor P whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any…
  16. Question 16 (1 mark, Multiple choice) – Which one of the following dependencies among the register operands of different instructions can cause a data hazard in a pipelined processor?
  17. Question 17 (1 mark, Multiple choice) – Consider the following recurrence relations: For all n > 1: T 1(n) = 4T 1(n/2) + T 2(n) T 2(n) = 5T 2(n/4) + ( 2 n) Assume that for all n 1, T 1(n) =…
  18. Question 18 (1 mark, Multiple choice) – With respect to a TCP connection between a client and a server, which one of the following statements is true?
  19. Question 19 (1 mark, Multiple select) – Which of the following statements is/are true with respect to the interaction of a web browser with a web server using HTTP 1.1?
  20. Question 20 (1 mark, Multiple select) – Let n > 1. Consider an n n matrix M with its elements from R. Let the vector (0, 1, 0, 0, , 0) Rn be in the null space of M. Which of the following…
  21. Question 21 (1 mark, Multiple select) – Consider the following Boolean expression of a function F: F(P, Q) = (P + Q) (PQ) Which of the following expressions is/are equivalent to F?
  22. Question 22 (1 mark, Multiple select) – Consider the 8-bit signed integers X, Y and Z represented using the sign-magnitude form. The binary representations of X and Y are as follows: X:…
  23. Question 23 (1 mark, Multiple select) – Let n be an odd number greater than 100. Consider a binary minheap with n elements stored in an array P whose index starts from 1. Which of the…
  24. Question 24 (1 mark, Multiple select) – Consider a hash table P[0, 1, , 10] that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function…
  25. Question 25 (1 mark, Multiple select) – Consider the following grammar where S is the start symbol, and a and b are terminal symbols. S aSbS bS Which of the following statements is/are true?
  26. Question 26 (1 mark, Multiple select) – Let M be a nondeterministic finite automaton (NFA) with 6 states over a finite alphabet. Which of the following options CANNOT be the number of states…
  27. Question 27 (1 mark, Multiple select) – Consider the following C statements: `char *str1 = "Hello; /* Statement S1 */` `char *str2 = "Hello;"; /* Statement S2 */` `int *str3 = "Hello"; /*…
  28. Question 28 (1 mark, Multiple select) – Which of the following statements is/are true?
  29. Question 29 (1 mark, Multiple select) – With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
  30. Question 30 (1 mark, Multiple select) – Let P, Q, R and S be the attributes of a relation in a relational schema. Let X Y indicate functional dependency in the context of a relational…
  31. Question 31 (1 mark, Multiple select) – In the context of relational database normalization, which of the following statements is/are true?
  32. Question 32 (1 mark, Numerical answer) – Consider the function f:R R defined as follows: f(x) = cases c 1 ex - c 2 e(1x), & if x > 0 \\ 3, & otherwise cases where c 1, c 2 R. If f is…
  33. Question 33 (1 mark, Numerical answer) – The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full…
  34. Question 34 (1 mark, Numerical answer) – Consider the following program in C: The output of the program is . (answer in integer)
  35. Question 35 (1 mark, Numerical answer) – Consider a system consisting of k instances of a resource R, being shared by 5 processes. Assume that each process requires a maximum of two instances…
  36. Question 36 (2 marks, Multiple choice) – Consider the real valued variables X, Y and Z represented using the IEEE 754 single-precision floating-point format. The binary representations of X…
  37. Question 37 (2 marks, Multiple choice) – Consider a 2-bit saturating up/down counter that performs the saturating up count when the input P is 0, and the saturating down count when P is 1.…
  38. Question 38 (2 marks, Multiple choice) – The size of the physical address space of a processor is 232 bytes. The capacity of a cache memory unit is 223 bytes. The cache block size is 128…
  39. Question 39 (2 marks, Multiple choice) – Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer…
  40. Question 40 (2 marks, Multiple choice) – Let P be the set of all integers from 1 to 15. Consider any order of insertion of the elements of P into a binary search tree that creates a complete…
  41. Question 41 (2 marks, Multiple choice) – Let G(V, E) be an undirected, edge-weighted graph with integer weights. The weight of a path is the sum of the weights of the edges in that path. The…
  42. Question 42 (2 marks, Multiple choice) – Consider the control flow graph shown in the figure. Which one of the following options correctly lists the set of redundant expressions (common…
  43. Question 43 (2 marks, Multiple choice) – Consider a relational database schema with two relations R(P, Q) and S(X, Y). Let E = \ u v w \, u, v R v, w S\ be a tuple relational calculus…
  44. Question 44 (2 marks, Multiple choice) – A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism’s…
  45. Question 45 (2 marks, Multiple choice) – Consider the implementation of sliding window protocol over a lossless link, with a window size of W frames, where each frame is of size 1000 bits…
  46. Question 46 (2 marks, Multiple select) – Let f:R R be defined as follows: f(x) = ( x 2 - x)(x - x 2) Which of the following statements is/are true?
  47. Question 47 (2 marks, Multiple choice) – Let G(V, E) be a simple, undirected graph. A vertex cover of G is a subset V' V such that for every (u, v) E, u V' or v V'. Let the size of the…
  48. Question 48 (2 marks, Multiple select) – Consider a Boolean function F with the following minterm expression: F(P, Q, R, S) = m(1, 2, 3, 4, 5, 7, 10, 12, 13, 14) Which of the following…
  49. Question 49 (2 marks, Multiple select) – Let G(V, E) be a simple, undirected, edge-weighted graph with unique edge weights. Which of the following statements about the minimum spanning trees…
  50. Question 50 (2 marks, Multiple choice) – Consider the standard depth-first search (DFS) algorithm which takes a directed acyclic graph (DAG) G(V, E) as input, where d[v] and f[v] are the…
  51. Question 51 (2 marks, Multiple select) – Let L 1 and L 2 be two languages over a finite alphabet, such that L 1 L 2 and L 2 are regular languages. Which of the following statements is/are…
  52. Question 52 (2 marks, Multiple select) – Consider the following context-free grammar G: S abaABAbba A aaB BAb bB a b a a B aBb ab In the above grammar, S is the start symbol, a and b are…
  53. Question 53 (2 marks, Multiple select) – Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations: **SDD1**: - D T \, V \ D.type = T.type; \; V.type =…
  54. Question 54 (2 marks, Multiple choice) – Consider a system that has a cache memory unit and a memory management unit (MMU) with a Translation Lookaside Buffer (TLB). Which one of the…
  55. Question 55 (2 marks, Multiple select) – An undirected, unweighted, simple graph G(V, E) is said to be 2-colorable if there exists a function c: V \0, 1\ such that for every (u, v) E, c(u)…
  56. Question 56 (2 marks, Multiple choice) – An ISP having an address block 202.16.0.0/15 assigns a block of 6000 IP addresses to a client, using the classless inter-domain routing (CIDR)…
  57. Question 57 (2 marks, Numerical answer) – Let G be an undirected graph, which is a path on 8 vertices. The number of matchings in G is . (answer in integer)
  58. Question 58 (2 marks, Numerical answer) – Let X be a random variable which takes values in the set \1, 2, 3, 4, 5, 6, 7, 8\. Further, (X = 1) = (X = 2) = (X = 5) = (X = 7) = 16 and (X = 3) =…
  59. Question 59 (2 marks, Numerical answer) – Consider a hard disk with a rotational speed of 15000 rpm. The time to move the read/write head from a track to its adjacent track is 1 millisecond.…
  60. Question 60 (2 marks, Numerical answer) – The EX stage of a pipelined processor performs the memory read operations for LOAD instructions, and the operations for the arithmetic and logic…
  61. Question 61 (2 marks, Numerical answer) – Consider the recursive functions represented by the following code segment: The smallest positive integer n for which `foo(n)` returns 5 is . (answer…
  62. Question 62 (2 marks, Numerical answer) – The following sequence corresponds to the preorder traversal of a binary search tree T: 50, 25, 13, 40, 30, 47, 75, 60, 70, 80, 77 The position of the…
  63. Question 63 (2 marks, Numerical answer) – Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the `fork()` system call is…
  64. Question 64 (2 marks, Numerical answer) – Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 6 seconds. The second type,…
  65. Question 65 (2 marks, Numerical answer) – Consider a relational database schema with a relation R(A, B, C, D). If \A, B\ and \A, C\ are the only two candidate keys of the relation R, then the…