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.
65 questions worth 100 marks in all (30 1-mark, 35 2-mark). Subjects covered: General Aptitude (10), Engineering Mathematics (9), Programming and Data Structures (7), Algorithms (6), Operating System (6), Computer Organization and Architecture (5), Computer Networks (5), Digital Logic (5).
Practise this paper in The GATE Grind →
- Question 1 – The antonym of the word protagonist is .
- Question 2 – The figure shows two 4-tile patterns: a 2x2 square block and a 1x4 straight bar. Either one or both of the patterns can be used any number of times…
- Question 3 – 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…
- Question 4 – 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…
- Question 5 – ‘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…
- Question 6 – Combinatorics deals with problems involving counting. For example, “How many distinct arrangements of N distinct objects in M spaces on a circle are…
- Question 7 – 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…
- Question 8 – For positive real numbers S and K, the function H K(S) is defined as H K(S) = (S - K, 0). A function N(S) of S is plotted, where N(S) = 0 for S 10,…
- Question 9 – In the 2020 summer Olympics’ Javelin throw finals, Neeraj Chopra exhibited a spectacular performance to win the gold medal. The silver medal was won…
- Question 10 – 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…
- Question 11 – 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…
- Question 12 – 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
- Question 13 – For n > 1, the maximum multiplicity of any eigenvalue of an n n matrix with elements from R is
- Question 14 – 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…
- Question 15 – Consider a processor P whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any…
- Question 16 – Which one of the following dependencies among the register operands of different instructions can cause a data hazard in a pipelined processor?
- Question 17 – 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) =…
- Question 18 – With respect to a TCP connection between a client and a server, which one of the following statements is true?
- Question 19 – 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?
- Question 20 – 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…
- Question 21 – 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?
- Question 22 – 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:…
- Question 23 – 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…
- Question 24 – 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…
- Question 25 – 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?
- Question 26 – 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…
- Question 27 – Consider the following C statements: Which of the following statements is/are true?
- Question 28 – Which of the following statements is/are true?
- Question 29 – With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
- Question 30 – 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…
- Question 31 – In the context of relational database normalization, which of the following statements is/are true?
- Question 32 – 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…
- Question 33 – 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…
- Question 34 – Consider the following program in C: The output of the program is . (answer in integer)
- Question 35 – 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…
- Question 36 – Consider the real valued variables X, Y and Z represented using the IEEE 754 single-precision floating-point format. The binary representations of X…
- Question 37 – 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.…
- Question 38 – 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…
- Question 39 – 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…
- Question 40 – 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…
- Question 41 – 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…
- Question 42 – Consider the control flow graph shown in the figure. Which one of the following options correctly lists the set of redundant expressions (common…
- Question 43 – 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…
- Question 44 – A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism’s…
- Question 45 – 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…
- Question 46 – Let f:R R be defined as follows: f(x) = ( x 2 - x)(x - x 2) Which of the following statements is/are true?
- Question 47 – 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…
- Question 48 – 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…
- Question 49 – 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…
- Question 50 – 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…
- Question 51 – 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…
- Question 52 – 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…
- Question 53 – Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations: **SDD1**: - D T \, V \ D.type = T.type; \; V.type =…
- Question 54 – 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…
- Question 55 – 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)…
- Question 56 – 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)…
- Question 57 – Let G be an undirected graph, which is a path on 8 vertices. The number of matchings in G is . (answer in integer)
- Question 58 – 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) =…
- Question 59 – 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.…
- Question 60 – The EX stage of a pipelined processor performs the memory read operations for LOAD instructions, and the operations for the arithmetic and logic…
- Question 61 – Consider the recursive functions represented by the following code segment: The smallest positive integer n for which `foo(n)` returns 5 is . (answer…
- Question 62 – 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…
- Question 63 – Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the `fork()` system call is…
- Question 64 – 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,…
- Question 65 – 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…