Previous year paper
GATE CS 2026 Set 2
GATE 2026 Computer Science and Information Technology - Session 2 (CS2)
Take this paper as a mock testGATE CS 2026GATE CS 2026 Set 1
General Aptitude
10 questions, 15 marks
Q.1
Expedite, Hasten, Hurry, __________ Fill the blank by choosing a word with a meaning similar to that of the words given above.
Verbal Ability and Grammar
Q.2
A black square has been cut into two parts. One part of it is shown in Panel I. Which one of the shapes in Panel II is the other part? Panel I shows a 6 by 6 square PQRS...
Spatial Aptitude
Q.3
A day can only be cloudy or sunny. The probability of a day being cloudy is , independent of the condition on other days. What is the probability that in any given four day...
Quantitative Aptitude
Q.4
The values of Stock A and Stock B on a particular day are Rs. 50 and Rs. 80, respectively. An investor invests Rs. 100 in Stock A and Rs. 80 in Stock B. He sells all the stocks...
Quantitative Aptitude
Q.5
'When it is raining, peacocks dance.' Based only on this sentence, which one of the following options is necessarily true?
Analytical and Logical Reasoning
Q.6
Water : P :: Food : Q Choose the P and Q combination from the options below to form a meaningful analogy.
Verbal Ability and Grammar
Q.7
Two tiles are missing in Panel I. Which one of the options in Panel II is the appropriate choice for the missing tiles? Panel I shows a 3 by 3 grid of dot-pattern tiles with the...
Analytical and Logical Reasoning
Q.8
Figures (i) and (ii) represent intercity highway systems. The black dots represent cities and the line segments between them represent intercity highways. A salesperson needs to...
Analytical and Logical Reasoning
Q.9
The figure in Panel I below is a grid of cells with four rows and four columns. The numbers on the top and on the left represent the number of cells that are to be shaded in tha...
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
For two different persons and , the predicate denotes that knows . Consider the following statement. There is a person who does not know anyone else, but...
Propositional and First-Order Logic
Q.12
The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. T S I: Inorder L: left subtree, node, right subtre...
Binary Trees, Binary Search Trees and Balanced Trees
Q.13
Which one of the following statements is equivalent to the following assertion? Turing machine decides the language
Decidability, Reducibility and Undecidability
Q.14
The probability density function of a random variable which takes real values is…
Probability and Statistics
Q.15
In the context of DBMS, consider the two sets T and S given below. T S I: Logical schema L: Views II: Physical schema M: File organization and indexes III: External schema N: Re...
ER Model and Relational Schema Design
Q.16
Which one of the following options is not a property of Boolean Algebra? Note: is OR operation, is AND operation, and is NOT operation
Boolean Algebra and Logic Minimization
Q.17
In C runtime environment, which one of the following is stored in heap?
Runtime Environments and Parameter Passing
Q.18
Consider the following two statements about interrupt handling mechanisms in a CPU. S1: In non-vectored interrupt mechanism, it usually takes more time to start the Interrupt Se...
I/O Interface, Interrupts and DMA
Q.19
Consider the following three ANSI-C programs, P1, P2, and P3. /* P1 / #include <stdio.h> int a=5; int main(){ int a=7; return(0); } / P2 */ #include <stdio.h> int main(){ int...
Functions, Recursion, Scope and Storage Classes
Q.20
Consider concurrent execution of two transactions and in a DBMS, both of which access a data object . For these two transactions to not conflict on , which one...
Transactions, Serializability and Concurrency Control
Q.21
Consider a file of size 4 million bytes being transferred between two hosts connected via a path consisting of three consecutive links of bandwidth 2 Mbps, 500 kbps, and 1 Mbps,...
OSI/TCP-IP Layering, Physical Layer and Switching
Q.22
Which one of the following protocols may need to broadcast some of its messages?
Application Layer: DNS, HTTP, SMTP, FTP
Q.23
Which one of the following CPU scheduling algorithms cannot be preemptive?
CPU Scheduling
Q.24
Consider the following functions, where is a positive integer. Which one of the following options lists the fun...
Asymptotic Analysis and Time/Space Complexity
Q.25
Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity ?
Asymptotic Analysis and Time/Space Complexity
Q.26
Let be a binary relation on the set , where if the product of and is square of an integer. Which of the following properties is/a...
Sets, Relations, Functions, Partial Orders and Lattices
Q.27
For a real number , let . Which of the following statements is/are true?
Calculus
Q.28
In a system, numbers are represented using 4-bit two's complement form. Consider four numbers , , and in the system. Which of t...
Number Representations and Computer Arithmetic
Q.29
Which of the following grammars is/are ambiguous?
Parsing and Syntax Analysis (LL and LR)
Q.30
The keys 5, 28, 19, 15, 26, 33, 12, 17, 10 are inserted into a hash table using the hash function . The collisions are resolved by chaining. After all the keys...
Hash Tables and Collision Resolution
Q.31
Consider the system of linear equations given below. Suppose the values of and are chosen such that the system of linear equations produ...
Linear Algebra
Q.32
Consider an array . Suppose the merge sort algorithm is executed on array to sort it in increasing order. The merge sort algorithm will c...
Divide and Conquer
Q.33
If an IP network uses a subnet mask of
255.255.240.0, the maximum number of IP addresses that can be assigned to network interfaces is __________. (answer in integer)IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT
Q.34
The 32-bit IEEE 754 single precision representation of a number is
0xC2710000. The number in decimal representation is ________. (rounded off to two decimal places)Number Representations and Computer Arithmetic
Q.35
A lexical analyzer uses the following token definitions - - - -…
Lexical Analysis
Q.36
Consider a complete graph with vertices (). Note that multiple spanning trees can be constructed over . Each of these spanning trees is represented as a se...
Graph Theory
Q.37
Let be a weighted directed acyclic graph with edges and vertices. Given and a source vertex in , which one of the following options gives the worst case t...
Single-Source and All-Pairs Shortest Paths
Q.38
Consider an array of integers of size . The indices of run from to . An algorithm is to be designed to check whether satisfies the condition given below.…
Searching and Sorting Algorithms
Q.39
Consider a table , where the elements , , represent the cost of the optimal solutions of different subproblems of a problem that is being solved us...
Dynamic Programming
Q.40
Consider the following 4-variable Boolean function Consider as MSB, as LSB. Which one of the following options rep...
Boolean Algebra and Logic Minimization
Q.41
Consider the canonical parsing of the grammar below using terminals and non-terminals with as the start symbol. ...
Parsing and Syntax Analysis (LL and LR)
Q.42
In the context of schema normalization in relational DBMS, consider a set F of functional dependencies. The set of all functional dependencies implied by F is called the closure...
Functional Dependencies and Normalization
Q.43
Consider the transmission of data bits
110001011over a link that uses Cyclic Redundancy Check (CRC) code for error detection. If the generator bit pattern is given to be…Data Link Layer: Framing, Error Detection and Sliding Window
Q.44
Consider a processor that has 16 general purpose registers and it uses 2-byte instruction format for all its instructions. Variable-sized opcodes are permitted. There are three...
Machine Instructions and Addressing Modes
Q.45
Consider the control flow graph given below. Control flow graph with ENTRY leading to basic block B1 (a = b + c); B1 branches to B2 (d = a + e) and B3 (e = a + f); B3 loops back...
Intermediate Code Generation, Data Flow Analysis and Code Optimization
Q.46
An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following tw...
File Organization, B-Trees and B+ Trees Indexing
Q.47
Consider the following two finite automata and . Two finite automata D1 and D2 over alphabet {0, 1}. D1 accepts strings formed by concatenating {000, 001, 010, 101},...
Regular Expressions, Finite Automata and Regular Languages
Q.48
Let and let . Which of the following constraints ensure(s) that the language is context-free?
Context-Free Grammars, Pushdown Automata and CFLs
Q.49
Consider a binary search tree (BST) with leaf nodes (). Given any node , the key present in the node is denoted as . All the keys present in the given BST...
Binary Trees, Binary Search Trees and Balanced Trees
Q.50
Consider a stack and a queue . Both of them are initially empty and have the capacity to store ten elements each. The elements 1, 2, 3, 4, and 5 arrive one by one, in tha...
Stacks and Queues
Q.51
Consider three processes P1, P2, and P3 running identical code, as shown in the pseudocode below. A and B are two binary semaphores initialized to 1 and 0, respectively. X is a...
Process Synchronization and Concurrency
Q.52
Consider a system with a processor and a 4 KB direct mapped cache with block size of 16 bytes. The system has a 16 MB physical memory. Four words P, Q, R, and S are accessed by...
Memory Hierarchy: Cache, Main Memory and Secondary Storage
Q.53
To keep track of free blocks in a file system, one of the two approaches is generally used - using bitmaps (bit vectors) or using linked lists. Consider that the linked list app...
File Systems, I/O and Disk Scheduling
Q.54
A system has a Translation Lookaside Buffer (TLB) that has a reach of 1 MB. TLB reach is defined as the total amount of physical memory that can be accessed through the TLB entr...
Memory Management and Virtual Memory
Q.55
Consider contiguous allocation of physical memory to processes using variable partitioning scheme. Suppose there are 8 holes in the memory of sizes 20 KB, 4 KB, 25 KB, 18 KB, 7...
Memory Management and Virtual Memory
Q.56
Consider a system with 1 MB physical memory and a word length of 1 byte. The system uses a direct mapped cache, with block numbers starting from 0. The word with physical addres...
Memory Hierarchy: Cache, Main Memory and Secondary Storage
Q.57
A non-pipelined instruction execution unit that operates at 1.6 GHz clock takes an average of 5 clock cycles to complete the execution of an instruction. To improve the performa...
Instruction Pipelining and Hazards
Q.58
Consider a new TCP connection between a sender and a receiver. The receiver advertised window is constant at 48 KB, the maximum segment size (MSS) is 2 KB, and the slow start th...
Transport Layer: UDP, TCP Flow and Congestion Control, Sockets
Q.59
Consider the digital circuit shown below with two input lines A and B, two select lines S0 and S1, and an output line Y. The blocks Q and M represent active high 2:4 decoder and...
Combinational Circuits
Q.60
Consider the following ANSI-C program. #include <stdio.h> int main(){ int *ptr, a, b, c; a=5; b=11; c=20; ptr=&a; ptr=c; ptr=&c; a=(&b); c=*ptr-a; printf("%d",c); return(0); }...
Pointers, Arrays and Strings
Q.61
Consider the following ANSI-C function. int func(int start, int end){ int length=end+1-start; if((length<1)||(start<0)||(end<0)){ return(0); } if(length%3==0){ return(func(start...
Functions, Recursion, Scope and Storage Classes
Q.62
The determinant of a matrix is . The value of the determinant of is ____________. (answer in integer)
Linear Algebra
Q.63
Suppose an unbiased coin is tossed 6 times. Each coin toss is independent of all previous coin tosses. Let be the event that among the second, fourth, and sixth coin tosse...
Probability and Statistics
Q.64
Consider a function defined as follows. For a real number , if the second digit after the decimal point in is one of...
Calculus
Q.65
It is necessary to design a link-layer protocol between two hosts that are directly connected over a lossless link of length 3000 kilometers. Assume that the link bandwidth is…
Data Link Layer: Framing, Error Detection and Sliding Window