GATE 2024 CS (CS2) – Previous Year Questions with Solutions
All 65 questions of GATE 2024 CS (CS2) with answers and explanations. Read each question, then practise it by topic or as a full paper.
Practise this paper in The GATE Grind →
- Question 1 – If '→' denotes increasing order of intensity, then the meaning of the words [walk → jog → sprint] is analogous to [bothered → → daunted]. Which one of…
- Question 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…
- Question 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…
- Question 4 – For positive non-zero real variables x and y, if (x+y2)=12[(x)+(y)], then, the value of xy+yx is
- Question 5 – In the sequence 6, 9, 14, x, 30, 41, a possible value of x is
- Question 6 – Sequence the following sentences in a coherent passage. P: This fortuitous geological event generated a colossal amount of energy and heat that…
- Question 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…
- Question 8 – The pie charts depict the shares of various power generation technologies in the total electricity generation of a country for the years 2007 (Coal…
- Question 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…
- Question 10 – In the 4 × 4 array shown below, each cell of the first three rows has either a cross (X) or a number. Row 1: 1, X, 4, 3; Row 2: X, 5, 5, 4; Row 3: 3,…
- Question 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…
- Question 12 – Let p and q be the following propositions: p: Fail grade can be given. q: Student scores more than 50% marks. Consider the statement: "Fail grade…
- Question 13 – Consider the following C program. Assume parameters to a function are evaluated from right to left. Which one of the following options is the CORRECT…
- Question 14 – The format of a single-precision floating-point number as per the IEEE 754 standard is Sign (1 bit), Exponent (8 bits), Mantissa (23 bits). Choose the…
- Question 15 – Let T(n) be the recurrence relation defined as follows: T(0)=1, T(1)=2, and T(n)=5T(n-1)-6T(n-2) for n 2. Which one of the following statements is…
- Question 16 – Let f(x) be a continuous function from R to R such that f(x)=1-f(2-x). Which one of the following options is the CORRECT value of 02 f(x)dx?
- Question 17 – Let A be the adjacency matrix of a simple undirected graph G. Suppose A is its own inverse. Which one of the following statements is always TRUE?
- Question 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
- Question 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…
- Question 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?
- Question 21 – Consider two sets. Set X: P. Lexical Analyzer, Q. Syntax Analyzer, R. Intermediate Code Generator, S. Code Optimizer. Set Y: 1. Abstract Syntax Tree,…
- Question 22 – Which one of the following regular expressions is equivalent to the language accepted by the DFA given below? (Two states: start state q0…
- Question 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…
- Question 24 – Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU) in a system with paging-based memory…
- Question 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…
- Question 26 – Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?
- Question 27 – Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
- Question 28 – Which of the following statements about IPv4 fragmentation is/are TRUE?
- Question 29 – Which of the following statements is/are FALSE?
- Question 30 – For a Boolean variable x, which of the following statements is/are FALSE?
- Question 31 – An instruction format has the structure: Instruction Number: Opcode destination reg, source reg-1, source reg-2. Consider the sequence: I1: DIV R3,…
- Question 32 – Which of the following fields of an IP header is/are always modified by any router before it forwards the IP packet?
- Question 33 – Consider the following C function definition. Which of the following statements is/are TRUE?
- Question 34 – Let P be the partial order defined on the set \1,2,3,4\ as follows: P=\(x,x) x\1,2,3,4\\\(1,2),(3,2),(3,4)\. The number of total orders on \1,2,3,4\…
- Question 35 – Let A be an array containing integer values. The distance of A is defined as the minimum number of elements in A that must be replaced with another…
- Question 36 – What is the output of the following C program?
- Question 37 – Consider a single processor system with four processes A, B, C, and D, where for each process the first value is its arrival time, and the second…
- Question 38 – Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?
- Question 39 – You are given a set V of distinct integers. A binary search tree T is created by inserting all elements of V one by one, starting with an empty tree.…
- Question 40 – Consider the CFG with start symbol S and terminals a,b,c,d: S AaAb BbBa, A cS, B dS. In the partially-filled LL(1) table, S row has S→AaAb at a,…
- Question 41 – Let M be the 5-state NFA with -transitions shown: start state 1 with ε to 2 and ε to 4; state 2 (accepting) goes 0 to 3; state 3 goes 0 to 2 and ε to…
- Question 42 – Consider an array X of n positive integers. The C code below computes the length of the longest subarray of X containing at most two distinct…
- Question 43 – Consider the expression x[i]=(p+r)*-s[i]+u/w. The triples are: (0) + p r; (1) ?; (2) uminus (1); (3) ?; (4) / u w; (5) + (3) (4); (6) ?; (7) = (6)…
- Question 44 – Let x and y be random variables, not necessarily independent, that take real values in the interval [0,1]. Let z=xy and let the mean values of x,y,z…
- Question 45 – The relation schema, Person(pid, city), describes the city of residence for every person uniquely identified by pid. The following relational algebra…
- Question 46 – Consider a multi-threaded program with two threads T1 and T2 sharing semaphores s1 (initialized to 1) and s2 (initialized to 0) and a global variable…
- Question 47 – Let A be an n n matrix over the set of all real numbers R. Let B be a matrix obtained from A by swapping two rows. Which of the following statements…
- Question 48 – Let S1 and S2 be two stacks. S1 has capacity 4 and already holds 100, 200, 300, 400 (400 on top). S2 has capacity 2 and is empty. Operations: PushToS2…
- Question 49 – Which of the following is/are EQUAL to 224 in radix-5 (i.e., base-5) notation?
- Question 50 – Consider 4-variable functions f1 = Σ(0,2,3,5,7,8,11,13), f2 = Σ(1,3,5,7,11,13,15), f3 = Σ(0,1,4,11), f4 = Σ(0,2,6,13). The circuit computes Y = (f1…
- Question 51 – Let G be an undirected connected graph in which every edge has a positive integer weight. Suppose that every spanning tree in G has even weight. Which…
- Question 52 – Consider a context-free grammar G with rules S aS, S aSbS, S c. Let w L(G) and let n a(w), n b(w), n c(w) denote the number of times a,b,c occur in w.…
- Question 53 – Consider a disk with rotation speed of 6000 RPM, average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors. A file has content stored…
- Question 54 – Consider a TCP connection operating with a congestion window of size 12 MSS when a timeout occurs due to packet loss. Assuming that all the segments…
- Question 55 – Consider an Ethernet segment with a transmission speed of 108 bits/sec and a maximum segment length of 500 meters. If the speed of propagation of the…
- Question 56 – A functional dependency F: X Y is termed as a useful functional dependency if and only if it satisfies: X is not the empty set, Y is not the empty…
- Question 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…
- Question 58 – A non-pipelined unit at 2 GHz takes an average of 6 cycles per instruction of program P. The unit is redesigned as a 5-stage pipeline at 2 GHz with…
- Question 59 – The number of distinct minimum-weight spanning trees of the following graph is (Vertices a,b,c,d,e,f,g; edges: a-b 1, a-f 1, c-d 1, d-e 1, a-g 2, b-g…
- Question 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…
- Question 61 – A processor uses a 32-bit instruction format and supports byte-addressable memory access. The ISA has 150 distinct instructions, equally divided into…
- Question 62 – Let L 1 be the language represented by the regular expression b*ab*(ab*ab*)* and L 2=\w(a+b)* w 4\, where w denotes the length of string w. The number…
- Question 63 – Let Z n be the group of integers \0,1,2,,n-1\ with addition modulo n as the group operation. The number of elements in the group Z 2 Z 3 Z 4 that are…
- Question 64 – Consider a 32-bit system with 4 KB page size and page table entries of size 4 bytes each (1 KB = 210 bytes). The OS uses a 2-level page table with an…
- Question 65 – Consider the augmented grammar parsed with an SLR parser, terminals \a,b,c,d,\#,@\: S' S; S SS Aa bAc Bc bBa; A d\#; B @. Let I 0=CLOSURE(\S' S\). The…