Previous year paper
GATE CS 2024 Set 2
GATE 2024 Computer Science and Information Technology - Set 2 (CS2)
Take this paper as a mock testGATE CS 2024GATE CS 2024 Set 1
General Aptitude
10 questions, 15 marks
Q.1
If '' denotes increasing order of intensity, then the meaning of the words [walk jog sprint] is analogous to [bothered ___...
Verbal Ability and Grammar
Q.2
Two wizards try to create a spell using all the four elements, water, air, fire, and earth. For this, they decide to mix all these elements in all possible orders. They also dec...
Quantitative Aptitude · Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.3
In an engineering college of 10,000 students, 1,500 like neither their core branches nor other branches. The number of students who like their core branches is ...
Quantitative Aptitude · Sets, Relations, Functions, Partial Orders and Lattices
Q.4
For positive non-zero real variables and , if then, the value of is
Quantitative Aptitude
Q.5
In the sequence , a possible value of is
Analytical and Logical Reasoning
Q.6
Sequence the following sentences in a coherent passage. P: This fortuitous geological event generated a colossal amount of energy and heat that resulted in the rocks rising to a...
Reading Comprehension and Verbal Deduction · Verbal Ability and Grammar
Q.7
A person sold two different items at the same price. He made 10% profit in one item, and 10% loss in the other item. In selling these two items, the person made a total of
Quantitative Aptitude
Q.8
The pie charts depict the shares of various power generation technologies in the total electricity generation of a country for the years 2007 and 2023. Two pie charts comparing...
Data Interpretation and Graphs
Q.9
A cube is to be cut into 8 pieces of equal size and shape. Here, each cut should be straight and it should not stop till it reaches the other end of the cube. The minimum number...
Spatial Aptitude · Analytical and Logical Reasoning
Q.10
In the array shown below, each cell of the first three rows has either a cross (X) or a number. A 4 by 4 grid where Row 1 is [1, X, 4, 3], Row 2 is [X, 5, 5, 4], Ro...
Analytical and Logical Reasoning
Computer Science and Information Technology
55 questions, 85 marks
Q.11
Consider a computer with a 4 MHz processor. Its DMA controller can transfer 8 bytes in 1 cycle from a device to main memory through cycle stealing at regular intervals. Which on...
I/O Interface, Interrupts and DMA
Q.12
Let and be the following propositions: : Fail grade can be given. : Student scores more than 50% marks. Consider the statement: "Fail grade cannot be given when st...
Propositional and First-Order Logic
Q.13
Consider the following C program. Assume parameters to a function are evaluated from right to left. #include <stdio.h> int g(int p) { printf("%d", p); return p; } int h(int q) {...
Functions, Recursion, Scope and Storage Classes
Q.14
The format of a single-precision floating-point number as per the IEEE 754 standard is: Sign Exponent Mantissa (1 bit) (8 bits) (23 bits) Choose the largest floating-point numbe...
ALU, Datapath and Control Unit · Number Representations and Computer Arithmetic
Q.15
Let be the recurrence relation defined as follows: , , and for Which one of the following statements is TRUE?
Asymptotic Analysis and Time/Space Complexity · Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.16
Let be a continuous function from to such that Which one of the following options is the CORRECT value of…
Calculus
Q.17
Let be the adjacency matrix of a simple undirected graph . Suppose is its own inverse. Which one of the following statements is always TRUE?
Graph Theory · Linear Algebra
Q.18
When six unbiased dice are rolled simultaneously, the probability of getting all distinct numbers (i.e., 1, 2, 3, 4, 5, and 6) is
Probability and Statistics · Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.19
Once the DBMS informs the user that a transaction has been successfully completed, its effect should persist even if the system crashes before all its changes are reflected on d...
Transactions, Serializability and Concurrency Control
Q.20
In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following statements is TRUE?
ER Model and Relational Schema Design
Q.21
Consider the following two sets: Set X Set Y P. Lexical Analyzer 1. Abstract Syntax Tree Q. Syntax Analyzer 2. Token R. Intermediate Code Generator 3. Parse Tree S. Code Optimiz...
Lexical Analysis · Parsing and Syntax Analysis (LL and LR) · Intermediate Code Generation, Data Flow Analysis and Code Optimization
Q.22
Which one of the following regular expressions is equivalent to the language accepted by the DFA given below? A 2-state DFA where the left initial state has a self-loop on 0 and...
Regular Expressions, Finite Automata and Regular Languages
Q.23
Node X has a TCP connection open to node Y. The packets from X to Y go through an intermediate IP router R. Ethernet switch S is the first switch on the network path between X a...
IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT · OSI/TCP-IP Layering, Physical Layer and Switching
Q.24
Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU) in a system with paging-based memory management?
Memory Management and Virtual Memory
Q.25
Consider a process P running on a CPU. Which one or more of the following events will always trigger a context switch by the OS that results in process P moving to a non-running...
Processes, Threads and System Calls · CPU Scheduling
Q.26
Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?
File Organization, B-Trees and B+ Trees Indexing
Q.27
Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
Transactions, Serializability and Concurrency Control
Q.28
Which of the following statements about IPv4 fragmentation is/are TRUE?
IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT
Q.29
Which of the following statements is/are FALSE?
Syntax-Directed Translation
Q.30
For a Boolean variable , which of the following statements is/are FALSE?
Boolean Algebra and Logic Minimization
Q.31
An instruction format has the following structure:
Instruction Number: Opcode destination reg, source reg-1, source reg-2Consider the following sequence of instructions to be...Instruction Pipelining and Hazards
Q.32
Which of the following fields of an IP header is/are always modified by any router before it forwards the IP packet?
IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT
Q.33
Consider the following C function definition. int fX(char *a){ char *b = a; while(*b) b++; return b - a;} Which of the following statements is/are TRUE?
Pointers, Arrays and Strings
Q.34
Let be the partial order defined on the set as follows The number of total orders on…
Sets, Relations, Functions, Partial Orders and Lattices · Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.35
Let be an array containing integer values. The distance of is defined as the minimum number of elements in that must be replaced with another integer so that the res...
Dynamic Programming
Q.36
What is the output of the following C program? #include <stdio.h> int main() { double a[2]={20.0, 25.0}, *p, *q; p = a; q = p + 1; printf("%d,%d", (int)(q - p), (int)(*q - *p));...
Pointers, Arrays and Strings
Q.37
Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second val...
CPU Scheduling
Q.38
Which one of the following CIDR prefixes exactly represents the range of IP addresses
10.12.2.0to10.12.3.255?IPv4/IPv6 Addressing, Subnetting, CIDR, ARP, ICMP and NAT
Q.39
You are given a set of distinct integers. A binary search tree is created by inserting all elements of one by one, starting with an empty tree. The tree follows...
Binary Trees, Binary Search Trees and Balanced Trees
Q.40
Consider the following context-free grammar where the start symbol is and the set of terminals is . …
Parsing and Syntax Analysis (LL and LR)
Q.41
Let be the 5-state NFA with -transitions shown in the diagram below. A 5-state NFA M with states 1 to 5: state 1 is the start state with epsilon transitions to sta...
Regular Expressions, Finite Automata and Regular Languages
Q.42
Consider an array
Xthat containsnpositive integers. A subarray ofXis defined to be a sequence of array locations with consecutive indices. The C code snippet given be...Dynamic Programming · Data Types, Operators and Control Flow
Q.43
Consider the following expression: . The following sequence shows the list of triples representing the given expression, with entries missing for t...
Intermediate Code Generation, Data Flow Analysis and Code Optimization
Q.44
Let and be random variables, not necessarily independent, that take real values in the interval . Let and let the mean values of be…
Probability and Statistics
Q.45
The relation schema,
Person(pid,city), describes the city of residence for every person uniquely identified bypid. The following relational algebra operators are available:...Relational Algebra and Tuple Relational Calculus
Q.46
Consider a multi-threaded program with two threads T1 and T2. The threads share two semaphores:
s1(initialized to 1) ands2(initialized to 0). The threads also share a glo...Process Synchronization and Concurrency · Deadlock Prevention, Avoidance and Detection
Q.47
Let be an matrix over the set of all real numbers . Let be a matrix obtained from by swapping two rows. Which of the following statements is...
Linear Algebra
Q.48
Let
S1andS2be two stacks.S1has capacity of 4 elements.S2has capacity of 2 elements.S1already has 4 elements: 100, 200, 300, and 400, whereasS2is empty, as...Stacks and Queues
Q.49
Which of the following is/are EQUAL to 224 in radix-5 (i.e., base-5) notation?
Number Representations and Computer Arithmetic
Q.50
Consider 4-variable functions expressed in sum-of-minterms form as given below. …
Combinational Circuits · Boolean Algebra and Logic Minimization
Q.51
Let be an undirected connected graph in which every edge has a positive integer weight. Suppose that every spanning tree in has even weight. Which of the following state...
Graph Theory · Minimum Spanning Trees
Q.52
Consider a context-free grammar with the following 3 rules. Let . Let…
Context-Free Grammars, Pushdown Automata and CFLs
Q.53
Consider a disk with the following specifications: rotation speed of 6000 RPM, average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors. A file has content store...
File Systems, I/O and Disk Scheduling · I/O Interface, Interrupts and DMA
Q.54
Consider a TCP connection operating at a point of time with the congestion window of size 12 MSS (Maximum Segment Size), when a timeout occurs due to packet loss. Assuming that...
Transport Layer: UDP, TCP Flow and Congestion Control, Sockets
Q.55
Consider an Ethernet segment with a transmission speed of bits/sec and a maximum segment length of 500 meters. If the speed of propagation of the signal in the medium is...
Medium Access Control (ALOHA, CSMA/CD) and Ethernet/Switching
Q.56
A functional dependency is termed as a useful functional dependency if and only if it satisfies all the following three conditions: - is not the empty s...
Functional Dependencies and Normalization · Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.57
A processor with 16 general purpose registers uses a 32-bit instruction format. The instruction format consists of an opcode field, an addressing mode field, two register operan...
Machine Instructions and Addressing Modes
Q.58
A non-pipelined instruction execution unit operating at 2 GHz takes an average of 6 cycles to execute an instruction of a program P. The unit is then redesigned to operate on a...
Instruction Pipelining and Hazards
Q.59
The number of distinct minimum-weight spanning trees of the following graph is _________ Undirected weighted graph with 7 vertices a, b, c, d, e, f, g and 12 edges: (a,b)=1, (a,...
Minimum Spanning Trees · Graph Theory
Q.60
The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. The chromatic number of the following graph is _________ An 8-vertex 4-...
Graph Theory
Q.61
A processor uses a 32-bit instruction format and supports byte-addressable memory access. The ISA of the processor has 150 distinct instructions. The instructions are equally di...
Machine Instructions and Addressing Modes
Q.62
Let be the language represented by the regular expression and , where denotes the length of string…
Regular Expressions, Finite Automata and Regular Languages · Combinatorics, Counting, Recurrence Relations and Generating Functions
Q.63
Let be the group of integers with addition modulo as the group operation. The number of elements in the group t...
Monoids and Groups
Q.64
Consider a 32-bit system with 4 KB page size and page table entries of size 4 bytes each. Assume bytes. The OS uses a 2-level page table for memory manage...
Memory Management and Virtual Memory
Q.65
Consider the following augmented grammar, which is to be parsed with a SLR parser. The set of terminals is …
Parsing and Syntax Analysis (LL and LR)