Previous year paper
GATE CS 2024 Set 1
GATE 2024 Computer Science and Information Technology - Set 1 (CS1)
Take this paper as a mock testGATE CS 2024GATE CS 2024 Set 2
General Aptitude
10 questions, 15 marks
Q.1
If '' denotes increasing order of intensity, then the meaning of the words [dry arid parched] is analogous to [diet fast…
Verbal Ability and Grammar
Q.2
If two distinct non-zero real variables and are such that is proportional to then the value of
Quantitative Aptitude
Q.3
Consider the following sample of numbers: 9, 18, 11, 14, 15, 17, 10, 69, 11, 13 The median of the sample is
Quantitative Aptitude
Q.4
The number of coins of Rs. 1, Rs. 5, and Rs. 10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in Rs. 5 coins is
Quantitative Aptitude
Q.5
For positive non-zero real variables and , if then, the value of is
Quantitative Aptitude
Q.6
In the given text, the blanks are numbered (i)-(iv). Select the best match for all the blanks. Steve was advised to keep his head __(i)__ before heading __(ii)__ to bat; for, wh...
Verbal Ability and Grammar
Q.7
A rectangular paper sheet of dimensions is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube wh...
Quantitative Aptitude
Q.8
The pie chart presents the percentage contribution of different macronutrients to a typical diet of a person. Pie chart of Macronutrient energy contribution:...
Data Interpretation and Graphs
Q.9
A rectangular paper of is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter...
Spatial Aptitude
Q.10
The least number of squares to be added in the figure to make a line of symmetry is Horizontal dashed line AB with 6 unit squares: on the left, one square above AB a...
Spatial Aptitude
Computer Science and Information Technology
55 questions, 85 marks
Q.11
Let be a function such that , where is the set of all real numbers. The set of al...
Calculus
Q.12
The product of all eigenvalues of the matrix is
Linear Algebra
Q.13
Consider a system that uses 5 bits for representing signed integers in 2's complement format. In this system, two integers and are represented as and ...
Number Representations and Computer Arithmetic
Q.14
Consider a permutation sampled uniformly at random from the set of all permutations of for some . Let be the event that occurs before…
Probability and Statistics · Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.15
Which one of the following statements is FALSE?
I/O Interface, Interrupts and DMA
Q.16
A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-...
Application Layer: DNS, HTTP, SMTP, FTP · Transport Layer: UDP, TCP Flow and Congestion Control, Sockets
Q.17
Given an integer array of size , we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass t...
Asymptotic Analysis and Time/Space Complexity · Searching and Sorting Algorithms
Q.18
Consider the following C program: #include <stdio.h> int main(){ int a = 6; int b = 0; while(a < 10) { a = a / 12 + 1; a += b;} printf("%d", a); return 0;} Which one of the foll...
Data Types, Operators and Control Flow
Q.19
Consider the following C program: #include <stdio.h> void fX(); int main(){ fX(); return 0;} void fX(){ char a; if((a=getchar()) != '\n') fX(); if(a != '\n') putchar(a);} Assume...
Functions, Recursion, Scope and Storage Classes
Q.20
Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following...
ER Model and Relational Schema Design
Q.21
In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
File Organization, B-Trees and B+ Trees Indexing
Q.22
Which of the following statements about a relation R in first normal form (1NF) is/are TRUE ?
Functional Dependencies and Normalization
Q.23
Let be two regular languages and a language which is not regular. Which of the following statements is/are always TRUE?
Regular Expressions, Finite Automata and Regular Languages
Q.24
Which of the following statements about threads is/are TRUE?
Processes, Threads and System Calls
Q.25
Which of the following process state transitions is/are NOT possible?
Processes, Threads and System Calls · CPU Scheduling
Q.26
Which of the following is/are Bottom-Up Parser(s)?
Parsing and Syntax Analysis (LL and LR)
Q.27
Let and be two events in a probability space with , and . Which of the following statements is/are TRUE?
Probability and Statistics
Q.28
Consider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires have no delays. Which of th...
Combinational Circuits
Q.29
TCP client P successfully establishes a connection to TCP server Q. Let denote the sequence number in the SYN sent from P to Q. Let denote the acknowledgement number...
Transport Layer: UDP, TCP Flow and Congestion Control, Sockets
Q.30
Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the...
Instruction Pipelining and Hazards
Q.31
Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?
IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT
Q.32
Let and be non-empty finite sets such that there exist one-to-one and onto functions (i) from to and (ii) from to . The number of possible...
Sets, Relations, Functions, Partial Orders and Lattices
Q.33
Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below. Operator Precedence Associativity + Highest Left - High R...
Parsing and Syntax Analysis (LL and LR)
Q.34
The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________
Graph Theory
Q.35
Consider the following two relations, and : R.A R.B 10 20 20 30 30 40 30 50 50 95 S.A S.C 10 90 30 45 40 80 The total number of tuples obtained by evaluating th...
Relational Algebra and Tuple Relational Calculus
Q.36
Consider a network path P-Q-R between nodes P and R via router Q. Node P sends a file of size bytes to R via this path by splitting the file into chunks of bytes e...
OSI/TCP-IP Layering, Physical Layer and Switching
Q.37
Consider the following syntax-directed definition (SDD).…
Syntax-Directed Translation
Q.38
Consider the following grammar , with as the start symbol. The grammar has three incomplete productions denoted by (1), (2), and (3).…
Parsing and Syntax Analysis (LL and LR)
Q.39
Consider the following pseudo-code. L1: t1 = -1 L2: t2 = 0 L3: t3 = 0 L4: t4 = 4 * t3 L5: t5 = 4 * t2 L6: t6 = t5 * M L7: t7 = t4 + t6 L8: t8 = a[t7] L9: if t8 <= max goto L11 L...
Intermediate Code Generation, Data Flow Analysis and Code Optimization
Q.40
Consider the following two threads T1 and T2 that update two shared variables
aandb. Assume that initiallya = b = 1. Though context switching between threads can happen...Process Synchronization and Concurrency
Q.41
An array
[82, 101, 90, 11, 111, 75, 33, 131, 44, 93]is heapified. Which one of the following options represents the first three elements in the heapified array?Binary Heaps and Priority Queues
Q.42
Consider the following recurrence relation: Which one of the follow...
Asymptotic Analysis and Time/Space Complexity
Q.43
Consider a binary min-heap containing 105 distinct elements. Let be the index (in the underlying array) of the maximum element stored in the heap. The number of possible val...
Binary Heaps and Priority Queues
Q.44
The symbol indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
Functional Dependencies and Normalization
Q.45
Let be a directed graph and a depth first search (DFS) spanning tree in that is rooted at a vertex . Suppose is also a breadth first search (BFS) tree in ,...
Graph Traversals, Topological Sort and Connectivity
Q.46
Consider the following read-write schedule over three transactions , and , where the subscripts in the schedule indicate transaction IDs…
Transactions, Serializability and Concurrency Control
Q.47
Consider a Boolean expression given by . Which of the following statements is/are CORRECT?
Boolean Algebra and Logic Minimization
Q.48
Consider the following C function definition. int f(int x, int y) { for (int i=0; i<y; i++) { x=x+x+y; } return x; } Which of the following statements is/are TRUE about the abov...
Data Types, Operators and Control Flow
Q.49
Let be any matrix, where . Which of the following statements is/are TRUE about the system of linear equations ?
Linear Algebra
Q.50
Consider the 5-state DFA accepting the language shown below. For any string let be the number of 's in and…
Regular Expressions, Finite Automata and Regular Languages
Q.51
The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let be any graph with vertices and chromatic number . Whic...
Graph Theory
Q.52
Consider the operators and defined by , for positive integers. Which of the following statements is/are TRUE?
Monoids and Groups
Q.53
Consider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both of them use the LRU (Least Rec...
Memory Hierarchy: Cache, Main Memory and Secondary Storage
Q.54
Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is ____...
Memory Hierarchy: Cache, Main Memory and Secondary Storage · File Systems, I/O and Disk Scheduling
Q.55
The baseline execution time of a program on a 2 GHz single core machine is 100 nanoseconds (ns). The code corresponding to 90% of the execution time can be fully parallelized. T...
Instruction Pipelining and Hazards · Calculus
Q.56
A given program has 25% load/store instructions. Suppose the ideal CPI (cycles per instruction) without any memory stalls is 2. The program exhibits 2% miss rate on instruction...
Memory Hierarchy: Cache, Main Memory and Secondary Storage · Instruction Pipelining and Hazards
Q.57
Consider the following code snippet using the
fork()andwait()system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully wi...Processes, Threads and System Calls
Q.58
Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination...
IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT
Q.59
Let be a context-free grammar in Chomsky Normal Form with and containing 10 variable symbols including the start symbol . T...
Context-Free Grammars, Pushdown Automata and CFLs
Q.60
The number of edges present in the forest generated by the DFS traversal of an undirected graph with 100 vertices is 40. The number of connected components in is _________
Graph Traversals, Topological Sort and Connectivity
Q.61
Consider the following two regular expressions over the alphabet : The total number of strings of length less than or equal to 5,...
Regular Expressions, Finite Automata and Regular Languages
Q.62
Consider a memory management system that uses a page size of 2 KB. Assume that both the physical and virtual addresses start from 0. Assume that the pages 0, 1, 2, and 3 are sto...
Memory Management and Virtual Memory
Q.63
A bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the probability (rounded off to 3 decima...
Probability and Statistics
Q.64
Consider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and M3 as shown below. X1 and X2 are inputs of M1. X3 and X4 are inputs of M2. A, B, and C are s...
Combinational Circuits
Q.65
Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first l...
IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT