Previous year paper
GATE CS 2023
GATE 2023 Computer Science and Information Technology (CS)
General Aptitude
10 questions, 15 marks
Q.1
We reached the station late, and _______ missed the train.
Verbal Ability and Grammar
Q.2
Kind : _______ : : Often : Frequently (By word meaning)
Verbal Ability and Grammar
Q.3
A series of natural numbers obeys for all integers . If , and , then what is…
Quantitative Aptitude
Q.4
A survey for a certain year found that 90% of pregnant women received medical care at least once before giving birth. Of these women, 60% received medical care from doctors, whi...
Analytical and Logical Reasoning
Q.5
Looking at the surface of a smooth 3-dimensional object from the outside, which one of the following options is TRUE?
Spatial Aptitude
Q.6
The country of Zombieland is in distress since more than 75% of its working population is suffering from serious health issues. Studies conducted by competent health experts con...
Reading Comprehension and Verbal Deduction
Q.7
Consider two functions of time (), where . Now consider the following two statements: (i) For some , . (...
Quantitative Aptitude
Q.8
Which one of the following sentence sequences creates a coherent narrative? (i) Once on the terrace, on her way to her small room in the corner, she notices the man right away....
Verbal Ability and Grammar
Q.9
and are functions of and , respectively, and for all real values of and . Which one of the following options is necessarily TRUE for al...
Quantitative Aptitude
Q.10
Which one of the options best describes the transformation of the 2-dimensional figure P to Q, and then to R, as shown? Transformation of a 2D irregular 5-pointed star P via Ope...
Spatial Aptitude
Computer Science and Information Technology
55 questions, 85 marks
Q.11
Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the target hardware. S2: The back...
Intermediate Code Generation, Data Flow Analysis and Code Optimization
Q.12
Which one of the following sequences when stored in an array at locations forms a max-heap?
Binary Heaps and Priority Queues
Q.13
Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel be a function that...
Arrays and Linked Lists
Q.14
Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet , and has the set of states , with being the st...
Regular Expressions, Finite Automata and Regular Languages
Q.15
The Lucas sequence is defined by the recurrence relation: with and . Which one of the options gi...
Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.16
Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
ER Model and Relational Schema Design
Q.17
Suppose two hosts are connected by a point-to-point link and they are configured to use Stop-and-Wait protocol for reliable data transfer. Identify in which of the following sce...
Data Link Layer: Framing, Error Detection and Sliding Window
Q.18
Let and…
Linear Algebra
Q.19
Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions…
Lexical Analysis
Q.20
An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let be the numbe...
Hash Tables and Collision Resolution
Q.21
The output of a 2-input multiplexer is connected back to one of its inputs as shown in the figure. A 2-input multiplexer with inputs 0 and 1, select line S, and output Q connect...
Combinational Circuits · Sequential Circuits, Counters and Registers
Q.22
Which one or more of the following need to be saved on a context switch from one thread (T1) of a process to another thread (T2) of the same process?
Processes, Threads and System Calls
Q.23
Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
Processes, Threads and System Calls · Memory Management and Virtual Memory
Q.24
Which of the following statements is/are CORRECT?
Turing Machines and Chomsky Hierarchy · Regular Expressions, Finite Automata and Regular Languages · Context-Free Grammars, Pushdown Automata and CFLs
Q.25
Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?
Routing Algorithms (Distance Vector, Link State) and BGP/OSPF
Q.26
Geetha has a conjecture about integers, which is of the form where is a statement about integers, and is a statement abo...
Propositional and First-Order Logic
Q.27
Which one or more of the following CPU scheduling algorithms can potentially cause starvation?
CPU Scheduling
Q.28
Let be a real-valued function. Which of the following statements is/are TRUE?
Calculus
Q.29
Let and be functions of natural numbers given by and . Which of the following statements is/are TRUE?
Asymptotic Analysis and Time/Space Complexity
Q.30
Let be the adjacency matrix of the graph with vertices . Undirected graph with 5 vertices {1, 2, 3, 4, 5}, edges (1,2), (2,3), (2,4), (3,5), (4,5), and se...
Linear Algebra · Graph Theory
Q.31
The value of the definite integral is _______. (Rounded off to the nearest integer)
Calculus
Q.32
A particular number is written as in radix- representation. The same number in radix- representation is _______.
Number Representations and Computer Arithmetic
Q.33
Consider a 3-stage pipelined processor having a delay of 10 ns (nanoseconds), 20 ns, and 14 ns, for the first, second, and the third stages, respectively. Assume that there is n...
Instruction Pipelining and Hazards
Q.34
A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer system polls the keyboard every 10 ms (milli seconds) to check for a keystroke and c...
I/O Interface, Interrupts and DMA
Q.35
The integer value printed by the ANSI-C program given below is _______. #include<stdio.h> int funcp(){ static int x = 1; x++; return x; } int main(){ int x,y; x = funcp(); y = f...
Functions, Recursion, Scope and Storage Classes
Q.36
Consider the following program: int main() int f1() int f2(int X) int f3() { { { { f1(); return(1); f3(); return(5); f2(2); } if (X==1) } f3(); return f1(); return(0); else } re...
Functions, Recursion, Scope and Storage Classes
Q.37
Consider the control flow graph shown. Control flow graph with basic blocks B1 (i = m - 1, j = n, a = 10), B2 (i = i + 1, j = j - 1), B3 (a = 20), and B4 (i = a + 1), edges ENTR...
Intermediate Code Generation, Data Flow Analysis and Code Optimization
Q.38
Consider the two functions incr and decr shown below. incr(){ wait(s); X = X+1; signal(s); } decr(){ wait(s); X = X-1; signal(s); } There are 5 threads each invoking inc...
Process Synchronization and Concurrency
Q.39
Consider the context-free grammar below where and are non-ter...
Context-Free Grammars, Pushdown Automata and CFLs
Q.40
Consider the pushdown automaton (PDA) P below, which runs on the input alphabet , has stack alphabet , and has three states , with being...
Context-Free Grammars, Pushdown Automata and CFLs
Q.41
Consider the given C-code and its corresponding assembly code, with a few operands U1–U4 being unknown. Some useful information as well as the semantics of each unique assembly...
Machine Instructions and Addressing Modes
Q.42
A 4 kilobyte (KB) byte-addressable memory is realized using four 1 KB memory blocks. Two input address lines (IA4 and IA3) are connected to the chip select (CS) port of these me...
Memory Hierarchy: Cache, Main Memory and Secondary Storage
Q.43
Consider a sequential digital circuit consisting of T flip-flops and D flip-flops as shown in the figure. CLKIN is the clock input to the circuit. At the beginning, Q1, Q2 and Q...
Sequential Circuits, Counters and Registers
Q.44
A Boolean digital circuit is composed using two 4-input multiplexers (M1 and M2) and one 2-input multiplexer (M3) as shown in the figure. X0–X7 are the inputs of the multiplexer...
Combinational Circuits
Q.45
Consider the IEEE-754 single precision floating point numbers Which one of the following corresponds to t...
ALU, Datapath and Control Unit
Q.46
Let be a priority queue for maintaining a set of elements. Suppose is implemented using a max-heap data structure. The operation Extract-Max(A) extracts and deletes the...
Binary Heaps and Priority Queues
Q.47
Consider the C function foo and the binary tree shown. Binary tree with root 10, left child 5 (with left child 3 and right child 8), and right child 11 (with right child 13). ty...
Binary Trees, Binary Search Trees and Balanced Trees · Functions, Recursion, Scope and Storage Classes
Q.48
Let , where is a large positive integer greater than 1000. Let be a positive integer less than . Let be subsets of with…
Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.49
Let be an onto (or surjective) function, where and are nonempty sets. Define an equivalence relation on the set as…
Sets, Relations, Functions, Partial Orders and Lattices
Q.50
Suppose you are asked to design a new reliable byte-stream transport protocol like TCP. This protocol, named myTCP, runs over a 100 Mbps network with Round Trip Time of 150 mill...
Transport Layer: UDP, TCP Flow and Congestion Control, Sockets
Q.51
Let be a set and denote the powerset of . Define a binary operation on as follows: Let . Wh...
Monoids and Groups · Sets, Relations, Functions, Partial Orders and Lattices
Q.52
Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local host, so a DNS lookup is tri...
Application Layer: DNS, HTTP, SMTP, FTP
Q.53
Consider a random experiment where two fair coins are tossed. Let be the event that denotes HEAD on both the throws, be the event that denotes HEAD on the first throw, a...
Probability and Statistics
Q.54
Consider functions Function 1 and Function 2 expressed in pseudocode as follows: Function 1 Function 2 while n > 1 do for i = 1 to 100 * n do for i = 1 to n do x = x + 1; x...
Asymptotic Analysis and Time/Space Complexity
Q.55
Let be a simple, finite, undirected graph with vertex set . Let denote the maximum degree of and let deno...
Graph Theory · Greedy Algorithms
Q.56
Let . Let denote the powerset of . Consider an undirected graph whose vertex set is . For any , is an edge in if an...
Graph Theory · Graph Traversals, Topological Sort and Connectivity
Q.57
Consider the following two-dimensional array in the C programming language, which is stored in row-major order: int D[128][128]; Demand paging is used for allocatin...
Memory Management and Virtual Memory
Q.58
Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with levels for virtual to physical address translation. The page siz...
Memory Management and Virtual Memory · Memory Hierarchy: Cache, Main Memory and Secondary Storage
Q.59
Consider a sequence of elements , and . The following operations are performed on a stack and a queue , both of...
Stacks and Queues
Q.60
Consider the syntax directed translation given by the following grammar and semantic rules. Here and are non-terminals. is the starting non-terminal, and #, 0...
Syntax-Directed Translation
Q.61
Consider the following table named Student in a relational database. The primary key of this table is rollNum. rollNum name gender marks 1 Naman M 62 2 Aliya F 70 3 Aliya F 80 4...
SQL Queries and Integrity Constraints
Q.62
Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 b...
File Organization, B-Trees and B+ Trees Indexing
Q.63
Consider the language over the alphabet , given below: The minimum numb...
Regular Expressions, Finite Automata and Regular Languages
Q.64
An 8-way set associative cache of size 64 KB () is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX, and BLOCK O...
Memory Hierarchy: Cache, Main Memory and Secondary Storage
Q.65
The forwarding table of a router is shown below. Subnet Number Subnet Mask Interface ID 200.150.0.0 255.255.0.0 1 200.150.64.0 255.255.224.0 2 200.150.68.0 255.255.255.0 3 200.1...
IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT · Routing Algorithms (Distance Vector, Link State) and BGP/OSPF