Previous year paper
GATE CS 2026 Set 1
GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
Take this paper as a mock testGATE CS 2026GATE CS 2026 Set 2
General Aptitude
10 questions, 15 marks
Q.1
The antonym of the word protagonist is ________.
Verbal Ability and Grammar
Q.2
The figure shows two 4-tile patterns. Two 4-tile patterns: a 2 by 2 square of 4 tiles on the left, and a 4 by 1 vertical strip of 4 tiles on the right. Either one or both of the...
Spatial Aptitude
Q.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 player plays until she is defe...
Analytical and Logical Reasoning
Q.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 three distinct sets of cours...
Quantitative Aptitude
Q.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 necessarily true?
Analytical and Logical Reasoning
Q.6
Combinatorics deals with problems involving counting. For example, "How many distinct arrangements of N distinct objects in M spaces on a circle are possible?" is a typical prob...
Reading Comprehension and Verbal Deduction
Q.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 views shown in Panel I? Pane...
Spatial Aptitude
Q.8
For positive real numbers and , the function is defined as: . The function is defined as…
Data Interpretation and Graphs
Q.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 by Jakub Vadlejch and the br...
Analytical and Logical Reasoning
Q.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 recorded each time. The proba...
Quantitative Aptitude
Computer Science and Information Technology
55 questions, 85 marks
Q.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 ball of the same color is pu...
Probability and Statistics
Q.12
Consider matrices with their elements from . The number of such matrices with even number of s in every row and every column is
Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.13
For , the maximum multiplicity of any eigenvalue of an matrix with elements from is
Linear Algebra
Q.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 List II P. Immediate 1. Element of an ar...
Machine Instructions and Addressing Modes
Q.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 instruction is the destina...
Machine Instructions and Addressing Modes
Q.16
Which one of the following dependencies among the register operands of different instructions can cause a data hazard in a pipelined processor?
Instruction Pipelining and Hazards
Q.17
Consider the following recurrence relations: For all , Ass...
Asymptotic Analysis and Time/Space Complexity
Q.18
With respect to a TCP connection between a client and a server, which one of the following statements is true?
Transport Layer: UDP, TCP Flow and Congestion Control, Sockets
Q.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?
Application Layer: DNS, HTTP, SMTP, FTP
Q.20
Let . Consider an matrix with its elements from . Let the vector be in the null space of . Which...
Linear Algebra
Q.21
Consider the following Boolean expression of a function : Which of the following expressions is/are equivalent to ?
Boolean Algebra and Logic Minimization
Q.22
Consider the 8-bit signed integers , and represented using the sign-magnitude form. The binary representations of and are as follows…
Number Representations and Computer Arithmetic
Q.23
Let be an odd number greater than . Consider a binary minheap with elements stored in an array whose index starts from . Which of the following indices of…
Binary Heaps and Priority Queues
Q.24
Consider a hash table that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is…
Hash Tables and Collision Resolution
Q.25
Consider the following grammar where is the start symbol, and and are terminal symbols. Which of the following statement...
Context-Free Grammars, Pushdown Automata and CFLs
Q.26
Let be a nondeterministic finite automaton (NFA) with 6 states over a finite alphabet. Which of the following options CANNOT be the number of states in the minimal determini...
Regular Expressions, Finite Automata and Regular Languages
Q.27
Consider the following C statements: char str1 = "Hello; / Statement S1 */ char str2 = "Hello;"; / Statement S2 */ int str3 = "Hello"; / Statement S3 */ Which of the follo...
Lexical Analysis
Q.28
Which of the following statements is/are true?
Parsing and Syntax Analysis (LL and LR)
Q.29
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
Deadlock Prevention, Avoidance and Detection
Q.30
Let and be the attributes of a relation in a relational schema. Let indicate functional dependency in the context of a relational database, w...
Functional Dependencies and Normalization
Q.31
In the context of relational database normalization, which of the following statements is/are true?
Functional Dependencies and Normalization
Q.32
Consider the function defined as follows…
Calculus
Q.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 binary tree with 23 nodes is __...
Binary Trees, Binary Search Trees and Balanced Trees
Q.34
Consider the following program in C: #include <stdio.h> void func(int i, int j) { if(i < j) { int i = 0; while (i < 10) { j += 2; i++; } } printf("%d", i); } int main() { int i...
Functions, Recursion, Scope and Storage Classes
Q.35
Consider a system consisting of instances of a resource , being shared by 5 processes. Assume that each process requires a maximum of two instances of resource and a...
Deadlock Prevention, Avoidance and Detection
Q.36
Consider the real valued variables , and represented using the IEEE 754 single-precision floating-point format. The binary representations of and in hexadecim...
ALU, Datapath and Control Unit
Q.37
Consider a 2-bit saturating up/down counter that performs the saturating up count when the input is 0, and the saturating down count when is 1. The Next State table of t...
Sequential Circuits, Counters and Registers
Q.38
The size of the physical address space of a processor is bytes. The capacity of a cache memory unit is bytes. The cache block size is bytes. The cache me...
Memory Hierarchy: Cache, Main Memory and Secondary Storage
Q.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 variable
head. struct node{ int...Arrays and Linked Lists
Q.40
Let be the set of all integers from to . Consider any order of insertion of the elements of into a binary search tree that creates a complete binary tree. Which...
Binary Trees, Binary Search Trees and Balanced Trees
Q.41
Let 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 length of a path is the n...
Single-Source and All-Pairs Shortest Paths
Q.42
Consider the control flow graph shown in the figure. Control flow graph with ENTRY leading to basic block B1 (a = b + i), which branches to B2 (a = g * k; f = d - f; a = c * 4)...
Intermediate Code Generation, Data Flow Analysis and Code Optimization
Q.43
Consider a relational database schema with two relations and . Let…
Relational Algebra and Tuple Relational Calculus
Q.44
A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism's slow-start threshold is se...
Transport Layer: UDP, TCP Flow and Congestion Control, Sockets
Q.45
Consider the implementation of sliding window protocol over a lossless link, with a window size of frames, where each frame is of size bits (including header). The ba...
Data Link Layer: Framing, Error Detection and Sliding Window
Q.46
Let be defined as follows: Which of the following statements is/ar...
Calculus
Q.47
Let be a simple, undirected graph. A vertex cover of is a subset such that for every , or . Let the size of the...
Graph Theory
Q.48
Consider a Boolean function with the following minterm expression: Which of the following options is/are the min...
Boolean Algebra and Logic Minimization
Q.49
Let be a simple, undirected, edge-weighted graph with unique edge weights. Which of the following statements about the minimum spanning trees (MST) of is/are true?
Minimum Spanning Trees
Q.50
Consider the following pseudocode for depth-first search (DFS) algorithm which takes a directed graph as input, where and are the discovery time and fini...
Graph Traversals, Topological Sort and Connectivity
Q.51
Let and be two languages over a finite alphabet, such that and are regular languages. Which of the following statements is/are always true?
Context-Free Grammars, Pushdown Automata and CFLs
Q.52
Consider the following context-free grammar . In the above grammar, is the...
Context-Free Grammars, Pushdown Automata and CFLs
Q.53
Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations. SDD1 Grammar (G1) SDD1 Semantic Rules SDD2 Grammar (G2) SDD2 Semantic Rules…
Syntax-Directed Translation
Q.54
Consider a system that has a cache memory unit and a memory management unit (MMU). The address input to the cache memory is a physical address. The MMU has a translation lookasi...
Memory Management and Virtual Memory
Q.55
An undirected, unweighted, simple graph is said to be 2-colorable if there exists a function such that for every …
Graph Traversals, Topological Sort and Connectivity
Q.56
An ISP having an address block
202.16.0.0/15assigns a block of IP addresses to a client, using the classless internet domain routing (CIDR) super-netting approach. Whi...IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT
Q.57
Let be an undirected graph, which is a path on 8 vertices. The number of matchings in is ______. (answer in integer)
Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.58
Let be a random variable which takes values in the set . Further, and…
Probability and Statistics
Q.59
Consider a hard disk with a rotational speed of rpm. The time to move the read/write head from a track to its adjacent track is millisecond. Initially, the head is o...
File Systems, I/O and Disk Scheduling
Q.60
The EX stage of a pipelined processor performs the memory read operations for LOAD instructions, and the operations for the arithmetic and logic instructions. Let denot...
Instruction Pipelining and Hazards
Q.61
Consider the recursive functions represented by the following code segment: int bar(int n){ if (n == 1) return 0; else return 1 + bar(n/2); } int foo(int n){ if (n == 1) return...
Functions, Recursion, Scope and Storage Classes
Q.62
The following sequence corresponds to the preorder traversal of a binary search tree : The position of the element in the...
Binary Trees, Binary Search Trees and Balanced Trees
Q.63
Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the
fork()system call is always successful in creating a...Processes, Threads and System Calls
Q.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, Controllers (C), requires a CPU bur...
CPU Scheduling
Q.65
Consider a relational database schema with a relation . If and are the only two candidate keys of the relation , then the number of super...
Functional Dependencies and Normalization