GATE Computer Science & IT 2025 — GATE 2025 · CS · Set 1

CS Set 1 · 65 of 65 questions publicly available

Held on: 2025-02-01

Sections: General Aptitude, Computer Science & IT

Subject marks
Subject1 mark questions2 mark questionsTotal marks
General Aptitude5515
Computer Science253085

Question 11 · 1 mark Q6257

Suppose a program is running on a non-pipelined single processor computer system. The computer is connected to an external device that can interrupt the processor asynchronously. The processor needs to execute the interrupt service routine (ISR) to serve this interrupt. The following steps (not necessarily in order) are taken by the processor when the interrupt arrives:

(i) The processor saves the content of the program counter.

(ii) The program counter is loaded with the start address of the ISR.

(iii) The processor finishes the present instruction.

Which ONE of the following is the CORRECT sequence of steps?

  1. A.

    (iii), (i), (ii)

  2. B.

    (i), (iii), (ii)

  3. C.

    (i), (ii), (iii)

  4. D.

    (iii), (ii), (i)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 12 · 1 mark Q6258

Which ONE of the following statements is FALSE regarding the symbol table?

  1. A.

    Symbol table is responsible for keeping track of the scope of variables.

  2. B.

    Symbol table can be implemented using a binary search tree.

  3. C.

    Symbol table is not required after the parsing phase.

  4. D.

    Symbol table is created during the lexical analysis phase.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 13 · 1 mark Q6259

Which ONE of the following techniques used in compiler code optimization uses live variable analysis?

  1. A.

    Run-time function call management

  2. B.

    Register assignment to variables

  3. C.

    Strength reduction

  4. D.

    Constant folding

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B

Solutions and video are in the course

Question 14 · 1 mark Q1924

Consider a demand paging memory management system with 32-bit logical address, 20-bit physical address, and page size of 2048 bytes. Assuming that the memory is byte addressable, what is the maximum number of entries in the page table?

  1. A.

    221

  2. B.

    220

  3. C.

    222

  4. D.

    224

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 15 · 1 mark Q6261

A schedule of three database transactions 𝑇1,𝑇2𝑇_1, 𝑇_2, and 𝑇3𝑇_3 is shown. 𝑅𝑖(𝐴)𝑅_𝑖(𝐴) and 𝑊𝑖(𝐴)𝑊_𝑖(𝐴) denote read and write of data item 𝐴𝐴 by transaction 𝑇𝑖,𝑖=1,2,3𝑇_𝑖 , 𝑖 = 1,2,3. The transaction 𝑇1𝑇_1 aborts at the end. Which other transaction(s) will be required to be rolled back?

𝑅1(𝑋)𝑊1(𝑌)𝑅2(𝑋)𝑅2(𝑌)𝑅3(𝑌)𝐴𝐵𝑂𝑅𝑇(𝑇1)𝑅_1 (𝑋) 𝑊_1 (𝑌) 𝑅_2 (𝑋) 𝑅_2 (𝑌) 𝑅_3 (𝑌) 𝐴𝐵𝑂𝑅𝑇(𝑇_1 )

  1. A.

    Only 𝑇2𝑇_2

  2. B.

    Only 𝑇3𝑇_3

  3. C.

    Both 𝑇2𝑇_2 and 𝑇3𝑇_3

  4. D.

    Neither 𝑇2𝑇_2 nor 𝑇3𝑇_3

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 16 · 1 mark Q6262

Identify the ONE CORRECT matching between the OSI layers and their corresponding functionalities as shown.

OSI LayerFunctionality(a)Networklayer(I)Packetrouting(b)Transportlayer(II)Framinganderrorhandling(c)Datalinklayer(III)Hosttohostcommunication\begin{array}{|l|l|} \hline \textbf{OSI Layer} & \textbf{Functionality} \\ \hline (a) Network layer & (I) Packet routing \\ \hline (b) Transport layer & (II) Framing and error handling \\ \hline (c) Datalink layer & (III) Host to host communication \\ \hline \end{array}

  1. A.

    (a)−(I),(b)−(II),(c)−(III)(a)-(I), (b)-(II), (c)-(III)

  2. B.

    (a)−(I),(b)−(III),(c)−(II)(a)-(I), (b)-(III), (c)-(II)

  3. C.

    (a)−(II),(b)−(I),(c)−(III)(a)-(II), (b)-(I), (c)-(III)

  4. D.

    (a)−(III),(b)−(II),(c)−(I)(a)-(III), (b)-(II), (c)-(I)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B

Solutions and video are in the course

Question 17 · 1 mark Q6263

𝑔(.)𝑔(. ) is a function from AA to 𝐵,𝑓(.)𝐵, 𝑓(. ) is a function from BB to CC, and their composition defined as 𝑓(𝑔(.))𝑓(𝑔(. )) is a mapping from AA to CC. If 𝑓(.)𝑓(. ) and 𝑓(𝑔(.))𝑓(𝑔(. )) are onto (surjective) functions, which ONE of the following is TRUE about the function 𝑔(.)𝑔(. )?

  1. A.

    𝑔(.)𝑔(. ) must be an onto (surjective) function.

  2. B.

    𝑔(.)𝑔(. ) must be a one-to-one (injective) function.

  3. C.

    𝑔(.)𝑔(. ) must be a bijective function, that is, both one-to-one and onto.

  4. D.

    𝑔(.)𝑔(. ) is not required to be a one-to-one or onto function.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): D

Solutions and video are in the course

Question 18 · 1 mark Q6264

Let GG be any undirected graph with positive edge weights, and 𝑇𝑇 be a minimum spanning tree of GG. For any two vertices, 𝑢𝑢 and 𝑣𝑣, let 𝑑1(𝑢,𝑣)𝑑_1(𝑢, 𝑣) and 𝑑2(𝑢,𝑣)𝑑_2(𝑢, 𝑣) be the shortest distances between uu and 𝑣𝑣 in GG and 𝑇, respectively. Which ONE of the options is CORRECT for all possible 𝐺,𝑇,𝑢𝐺, 𝑇, 𝑢 and 𝑣𝑣?

  1. A.

    d1(u,v)=d2(u,v)d_1(u, v) = d_2(u, v)

  2. B.

    d1(u,v)≤d2(u,v)d_1(u, v) \leq d_2(u, v)

  3. C.

    d1(u,v)≥d2(u,v)d_1(u, v) \geq d_2(u, v)

  4. D.

    d1(u,v)≠d2(u,v)d_1(u, v) \neq d_2(u, v)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B

Solutions and video are in the course

Question 19 · 1 mark Q6265

Consider the following context-free grammar GG, where 𝑆,𝐴,𝑆, 𝐴, and BB are the variables (non-terminals), aa and bb are the terminal symbols, SS is the start variable, and the rules of GG are described as:

𝑆→𝑎𝑎𝐵∣𝐴𝑏𝑏𝐴→𝑎∣𝑎𝐴𝐵→𝑏∣𝑏B𝑆 → 𝑎𝑎𝐵 | 𝐴𝑏𝑏 \\ \\𝐴 → 𝑎 | 𝑎𝐴 \\ \\𝐵 → 𝑏 | 𝑏B \\

Which ONE of the languages 𝐿(𝐺)𝐿(𝐺) is accepted by GG?

  1. A.

    L(G)={a2bn∣n≥1}∪{anb2∣n≥1}L(G) = \{ a^{2} b^n \mid n \geq 1 \} \cup \{ a^n b^2 \mid n \geq 1 \}

  2. B.

    L(G)={anb2n∣n≥1}∪{a2nbn∣n≥1}L(G) = \{ a^n b^{2n} \mid n \geq 1 \} \cup \{ a^{2n} b^n \mid n \geq 1 \}

  3. C.

    L(G)={anbn∣n≥1}L(G) = \{ a^n b^n \mid n \geq 1 \}

  4. D.

    L(G)={a2nb2n∣n≥1}L(G) = \{ a^{2n} b^{2n} \mid n \geq 1 \}

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 20 · 1 mark Q6266

Consider the following recurrence relation:

T(n)=2T(n−1)+n2n,for n>0,T(0)=1.T(n) = 2T(n - 1) + n 2^n, \quad \text{for } n > 0, \quad T(0) = 1.

Which ONE of the following options is CORRECT?

  1. A.

    T(n)=Θ(n22n)T(n) = \Theta(n^2 2^n)

  2. B.

    T(n)=Θ(n2n)T(n) = \Theta(n 2^n)

  3. C.

    T(n)=Θ((log⁡n)22n)T(n) = \Theta((\log n)^2 2^n)

  4. D.

    T(n)=Θ(4n)T(n) = \Theta(4^n)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 21 · 1 mark Q6267

Consider the following B+B^+ tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the B+B^+ tree. Which of the following options(s) is/are CORRECT?

  1. A.

    None of the nodes will split.

  2. B.

    At least one node will split and redistribute.

  3. C.

    The total number of nodes will remain same.

  4. D.

    The height of the tree will increase.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B, D

Solutions and video are in the course

Question 22 · 1 mark Q6268

Consider the 3-way handshaking protocol for TCP connection establishment. Let the three packets exchanged during the connection establishment be denoted as P1, P2, and P3, in order. Which of the following option(s) is/are TRUE with respect to TCP header flags that are set in the packets?

  1. A.

    P3: SYN = 1, ACK = 1

  2. B.

    P2: SYN = 1, ACK = 1

  3. C.

    P2: SYN = 0, ACK = 1

  4. D.

    P1: SYN = 1

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B, D

Solutions and video are in the course

Question 23 · 1 mark Q6269

Consider the given system of linear equations for variables xx and yy, where kk is a real-valued constant. Which of the following option(s) is/are CORRECT?

𝑥+𝑘𝑦=1𝑘𝑥+𝑦=−1𝑥 + 𝑘𝑦 = 1 \\ 𝑘𝑥 + 𝑦 = −1

  1. A.

    There is exactly one value of 𝑘 for which the above system of equations has no solution.

  2. B.

    There exist an infinite number of values of 𝑘 for which the system of equations has no solution.

  3. C.

    There exists exactly one value of 𝑘 for which the system of equations has exactly one solution.

  4. D.

    There exists exactly one value of 𝑘 for which the system of equations has an infinite number of solutions.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A, D

Solutions and video are in the course

Question 24 · 1 mark Q6270

Let 𝑋𝑋 be a 3-variable Boolean function that produces output as ‘1’ when at least two of the input variables are ‘1’. Which of the following statement(s) is/are CORRECT, where 𝑎,𝑏,𝑐,𝑑,𝑒 𝑎, 𝑏, 𝑐, 𝑑,𝑒 are Boolean variables?

  1. A.

    𝑋(𝑎,𝑏,𝑋(𝑐,𝑑,𝑒))=𝑋(𝑋(𝑎,𝑏,𝑐),𝑑,𝑒)𝑋(𝑎, 𝑏, 𝑋(𝑐, 𝑑,𝑒)) = 𝑋(𝑋(𝑎, 𝑏, 𝑐), 𝑑,𝑒)

  2. B.

    𝑋(𝑎,𝑏,𝑋(𝑎,𝑏,𝑐))=𝑋(𝑎,𝑏,𝑐)𝑋(𝑎, 𝑏, 𝑋(𝑎, 𝑏, 𝑐)) = 𝑋(𝑎, 𝑏, 𝑐)

  3. C.

    𝑋(𝑎,𝑏,𝑋(𝑎,𝑐,𝑑))=(𝑋(𝑎,𝑏,𝑎)AND𝑋(𝑐,𝑑,𝑐))𝑋(𝑎, 𝑏, 𝑋(𝑎, 𝑐, 𝑑)) = (𝑋(𝑎, 𝑏, 𝑎) AND 𝑋(𝑐, 𝑑, 𝑐))

  4. D.

    𝑋(𝑎,𝑏,𝑐)=𝑋(𝑎,𝑋(𝑎,𝑏,𝑐),𝑋(𝑎,𝑐,𝑐))𝑋(𝑎, 𝑏, 𝑐) = 𝑋(𝑎, 𝑋(𝑎, 𝑏, 𝑐), 𝑋(𝑎, 𝑐, 𝑐))

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B, D

Solutions and video are in the course

Question 25 · 1 mark Q6271

The number −6 can be represented as 1010 in 4-bit 2’s complement representation. Which of the following is/are CORRECT 2’s complement representation(s) of −6?

  1. A.

    1000 1010 in 8-bits

  2. B.

    1111 1010 in 8-bits

  3. C.

    1000 0000 0000 1010 in 16-bits

  4. D.

    1111 1111 1111 1010 in 16-bits

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B, D

Solutions and video are in the course

Question 26 · 1 mark Q6272

Which of the following statement(s) is/are TRUE for any binary search tree (BST) having 𝑛 distinct integers?

  1. A.

    The maximum length of a path from the root node to any other node is (𝑛−1)(𝑛 − 1).

  2. B.

    An inorder traversal will always produce a sorted sequence of elements

  3. C.

    Finding an element takes 𝑂(log2𝑛)𝑂(log_2 𝑛) time in the worst case.

  4. D.

    Every BST is also a Min-Heap.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A, B

Solutions and video are in the course

Question 27 · 1 mark Q6273

A partial data path of a processor is given in the figure, where RA, RB, and RZ are 32-bit registers. Which option(s) is/are CORRECT related to arithmetic operations using the data path as shown?

  1. A.

    The data path can implement arithmetic operations involving two registers.

  2. B.

    The data path can implement arithmetic operations involving one register and one immediate value.

  3. C.

    The data path can implement arithmetic operations involving two immediate values.

  4. D.

    The data path can only implement arithmetic operations involving one register and one immediate value.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A, B, C

Solutions and video are in the course

Question 28 · 1 mark Q6274

A regular language LL is accepted by a non-deterministic finite automaton (NFA) with nn states. Which of the following statement(s) is/are FALSE?

  1. A.

    LL may have an accepting NFA with  <n< n states

  2. B.

    LL may have an accepting DFA with <n< n states.

  3. C.

    There exists a DFA with  ≤2n≤ 2^n states that accepts LL.

  4. D.

    Every DFA that accepts LL has  >2n> 2^n states.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): D

Solutions and video are in the course

Question 29 · 1 mark Q1859

Suppose in a multiprogramming environment, the following C program segment is executed. A process goes into I/O queue whenever an I/O related operation is performed. Assume that there will always be a context switch whenever a process requests for an I/O, and also whenever the process returns from an I/O. The number of times the process will enter the ready queue during its lifetime (not counting the time the process enters the ready queue when it is run initially) is _______. (Answer in integer) 

int main() {

  int x=0,i=0;

  scanf("%d",&x);

   for(i=0; i<20; i++)

   { x = x+20;

    printf("%d\n",x);

   } return 0;

}

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 21

Solutions and video are in the course

Question 30 · 1 mark Q6276

Let 𝑆 be the set of all ternary strings defined over the alphabet {𝑎,𝑏,𝑐}\{𝑎, 𝑏, 𝑐\}. Consider all strings in SS that contain at least one occurrence of two consecutive symbols, that is, “aa”, “bb” or “cc”. The number of such strings of length 5 that are possible is _______. (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 195

Solutions and video are in the course

Question 31 · 1 mark Q6277

Consider the given function 𝑓(𝑥)𝑓(𝑥).

f(x)={ax+b,for x<1x3+x2+1,for x≥1f(x) =\begin{cases} ax + b, & \text{for } x < 1 \\x^3 + x^2 + 1, & \text{for } x \geq 1\end{cases}

If the function is differentiable everywhere, the value of 𝑏 must be ________. (rounded off to one decimal place)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): -2

Solutions and video are in the course

Question 32 · 1 mark Q6278

A box contains 5 coins: 4 regular coins and 1 fake coin. When a regular coin is tossed, the probability 𝑃(ℎ𝑒𝑎𝑑) = 0.5 and for a fake coin, 𝑃(ℎ𝑒𝑎𝑑) = 1. You pick a coin at random and toss it twice, and get two heads. The probability that the coin you have chosen is the fake coin is _______. (rounded off to two decimal places)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 0.5

Solutions and video are in the course

Question 33 · 1 mark Q6279

The pseudocode of a function fun()fun() is given below:

fun(int A[0, ... , n-1]){for i=0 to n−2for j=0 to n−i−2if (A[j]>A[j+1])then swap A[j] and A[j+1]}\begin{aligned}&\text{fun(int A[0, ... , n-1])} \\ &\text{\{} \\ &\quad \text{for } i = 0 \text{ to } n-2 \\ &\quad \quad \text{for } j = 0 \text{ to } n-i-2 \\ &\quad \quad \quad \text{if } (A[j] > A[j+1]) \\ &\quad \quad \quad \quad \text{then swap A[j] and A[j+1]} \\ &\text{\}}\end{aligned}

Let 𝐴[0,…,29]𝐴[0, … ,29] be an array storing 30 distinct integers in descending order. The number of swap operations that will be performed, if the function fun()fun() is called with 𝐴[0,…,29]𝐴[0, … ,29] as argument, is __________. (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 435

Solutions and video are in the course

Question 34 · 1 mark Q6280

#include <stdio.h>
void foo(int *p, int x) {
*p = x;
}
int main() {
int *z;
int a = 20, b = 25;
z = &a;
foo(z, b);
printf("%d", a);
return 0;
}

The output of the given C program is __________. (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 25

Solutions and video are in the course

Question 35 · 1 mark Q6281

The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node.

Suppose a Min-Heap 𝑇 stores 32 keys. The height of 𝑇 is _____________. (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 5 integer

Solutions and video are in the course

Question 36 · 2 marks Q6282

Consider a memory system with 1M bytes of main memory and 16K bytes of cache memory. Assume that the processor generates 20-bit memory address, and the cache block size is 16 bytes. If the cache uses direct mapping, how many bits will be required to store all the tag values? [Assume memory is byte addressable, 1K=210 , 1M=220 ]

  1. A.

    6 × 210

  2. B.

    8 × 210

  3. C.

    212

  4. D.

    214

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 37 · 2 marks Q6283

A processor has 64 general-purpose registers and 50 distinct instruction types. An instruction is encoded in 32-bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction?

ADD R1, #25             // R1 = R1 + 25

  1. A.

    16

  2. B.

    20

  3. C.

    22

  4. D.

    24

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B

Solutions and video are in the course

Question 38 · 2 marks Q1898

A computer has two processors, 𝑀1 and 𝑀2. Four processes 𝑃1, 𝑃2, 𝑃3, 𝑃4 with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows:

• 𝑀1 uses priority of execution for the processes as, 𝑃1 > 𝑃3 > 𝑃2 > 𝑃4, i.e., 𝑃1 and 𝑃4 have highest and lowest priorities, respectively. 

• 𝑀2 uses priority of execution for the processes as, 𝑃2 > 𝑃3 > 𝑃4 > 𝑃1, i.e., 𝑃2 and 𝑃1 have highest and lowest priorities, respectively. 

A process 𝑃𝑖 is scheduled to a processor 𝑀𝑘, if the processor is free and no other process 𝑃𝑗 is waiting with higher priority. At any given point of time, a process can be allocated to any one of the free processors without violating the execution priority rules. Ignore the context switch time. What will be the average waiting time of the processes in milliseconds?

  1. A.

    9.00

  2. B.

    8.75

  3. C.

    6.50

  4. D.

    7.50

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 39 · 2 marks Q6285

Consider two relations describing 𝑡𝑒𝑎𝑚𝑠𝑡𝑒𝑎𝑚𝑠 and 𝑝𝑙𝑎𝑦𝑒𝑟𝑠𝑝𝑙𝑎𝑦𝑒𝑟𝑠 in a sports league:

• 𝑡𝑒𝑎𝑚𝑠(𝑡𝑖𝑑,𝑡𝑛𝑎𝑚𝑒):𝑡𝑖𝑑,𝑡𝑛𝑎𝑚e𝑡𝑒𝑎𝑚𝑠(𝑡𝑖𝑑,𝑡𝑛𝑎𝑚𝑒): 𝑡𝑖𝑑, 𝑡𝑛𝑎𝑚e are team-id and team-name, respectively

• 𝑝𝑙𝑎𝑦𝑒𝑟𝑠(𝑝𝑖𝑑,𝑝𝑛𝑎𝑚𝑒,𝑡𝑖𝑑):𝑝𝑖𝑑,𝑝𝑛𝑎𝑚𝑒𝑝𝑙𝑎𝑦𝑒𝑟𝑠(𝑝𝑖𝑑, 𝑝𝑛𝑎𝑚𝑒,𝑡𝑖𝑑): 𝑝𝑖𝑑, 𝑝𝑛𝑎𝑚𝑒, and 𝑡𝑖𝑑𝑡𝑖𝑑 denote player-id, player-name and the team-id of the player, respectively

Which ONE of the following tuple relational calculus queries returns the name of the players who play for the team having 𝑡𝑛𝑎𝑚𝑒 as ′𝑀𝐼𝑀𝐼′?

  1. A. image.png

  2. B. image.png

  3. C. image.png

  4. D. image.png

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 40 · 2 marks Q6286

A packet with the destination IP address 145.36.109.70 arrives at a router whose routing table is shown. Which interface will the packet be forwarded to?

  1. A.

    E3

  2. B.

    E1

  3. C.

    E2

  4. D.

    E5

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 41 · 2 marks Q6287

Let (A) be a 2 × 2 matrix as given.

image.png

What are the eigenvalues of the matrix 𝐴^(13) ?

  1. A.

    (1, −1)

  2. B.

    2(2)^(1/2) ​and -2(2)^(1/2)

  3. C.

    4(2)^(1/2) ​and -4(2)^(1/2)

  4. D.

    64(2)^(1/2) ​and -64(2)^(1/2)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): D

Solutions and video are in the course

Question 42 · 2 marks Q6288

Consider the following four variable Boolean function in sum-of-product form

𝐹(𝑏3,𝑏2,𝑏1,𝑏0)=∑(0,2,4,8,10,11,12).𝐹(𝑏_3, 𝑏_2, 𝑏_1, 𝑏_0) = ∑(0, 2, 4, 8, 10, 11, 12).

where the value of the function is computed by considering 𝑏3𝑏2𝑏1𝑏0𝑏_3𝑏_2𝑏_1𝑏_0 as a 4-bit binary number, where 𝑏3𝑏_3 denotes the most significant bit and 𝑏0𝑏_0 denotes the least significant bit. Note that there are no don’t care terms. Which ONE of the following options is the CORRECT minimized Boolean expression for FF?

  1. A.

    bˉ1bˉ0+bˉ2bˉ0+b1bˉ2b3\bar{b}_1 \bar{b}_0 + \bar{b}_2 \bar{b}_0 + b_1 \bar{b}_2 b_3

  2. B.

    bˉ1bˉ0+bˉ2bˉ0\bar{b}_1 \bar{b}_0 + \bar{b}_2 \bar{b}_0

  3. C.

    bˉ2bˉ0+b1b2b3\bar{b}_2 \bar{b}_0 + b_1 b_2 b_3

  4. D.

    bˉ0bˉ2+bˉ3\bar{b}_0 \bar{b}_2 + \bar{b}_3

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 43 · 2 marks Q6289

Let 𝐺(𝑉,𝐸)𝐺(𝑉, 𝐸) be an undirected and unweighted graph with 100 vertices. Let 𝑑(𝑢,𝑣)𝑑(𝑢, 𝑣) denote the number of edges in a shortest path between vertices uu and vv in VV. Let the maximum value of 𝑑(𝑢,𝑣),𝑢,𝑣∈𝑉𝑑(𝑢, 𝑣), 𝑢, 𝑣 ∈ 𝑉 such that 𝑢≠𝑣𝑢 ≠ 𝑣, be 30. Let TT be any breadth-first-search tree of GG. Which ONE of the given options is CORRECT for every such graph GG ?

  1. A.

    The height of TT is exactly 15.

  2. B.

    The height of TT is exactly 30.

  3. C.

    The height of TT is at least 15.

  4. D.

    The height of TT is at least 30.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 44 · 2 marks Q6290

Consider the following two languages over the alphabet {𝑎,𝑏}\{𝑎, 𝑏\}:

L1={αβα∣α∈{a,b}+ AND β∈{a,b}+}L2={αβα∣α∈{a}+ AND β∈{a,b}+}L_1 = \{ \alpha \beta \alpha \mid \alpha \in \{a, b\}^+ \text{ AND } \beta \in \{a, b\}^+ \} \\ L_2 = \{ \alpha \beta \alpha \mid \alpha \in \{a\}^+ \text{ AND } \beta \in \{a, b\}^+ \}

Which ONE of the following statements is CORRECT ?

  1. A.

    Both L1L_1 and L2L_2 are regular languages.

  2. B.

    L1L_1 is a regular language but L2L_2 is not a regular language.

  3. C.

    L1L_1 is not a regular language but L2L_2 is a regular language.

  4. D.

    Neither L1L_1 nor L2L_2 is a regular language.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 45 · 2 marks Q6291

Consider the following two languages over the alphabet {𝑎,𝑏,𝑐}\{𝑎, 𝑏, 𝑐\}, where 𝑚 and 𝑛 are natural numbers.

L1={ambmcm+n∣m,n≥1}L2={ambncm+n∣m,n≥1}L_1 = \{ a^m b^m c^{m+n} \mid m, n \geq 1 \} \\ L_2 = \{ a^m b^n c^{m+n} \mid m, n \geq 1 \}

Which ONE of the following statements is CORRECT?

  1. A.

    Both 𝐿1𝐿_1 and 𝐿2𝐿_2 are context-free languages.

  2. B.

    𝐿1𝐿_1 is a context-free language but 𝐿2𝐿_2 is not a context-free language.

  3. C.

    𝐿1𝐿_1 is not a context-free language but 𝐿2𝐿_2 is a context-free language.

  4. D.

    Neither 𝐿1𝐿_1 nor 𝐿2𝐿_2 are context-free languages.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 46 · 2 marks Q6292

Which of the following statement(s) is/are TRUE while computing FirstFirst and FollowFollow during top down parsing by a compiler?

  1. A.

    For a production 𝐴→𝜖,𝜖 𝐴 → 𝜖, 𝜖 will be added to 𝐹𝑖𝑟𝑠𝑡(𝐴)𝐹𝑖𝑟𝑠𝑡(𝐴).

  2. B.

    If there is any input right end marker, it will be added to 𝐹𝑖𝑟𝑠𝑡(𝑆)𝐹𝑖𝑟𝑠𝑡(𝑆), where SS is the start symbol.

  3. C.

    For a production 𝐴→𝜖,𝜖𝐴 → 𝜖, 𝜖 will be added to 𝐹𝑜𝑙𝑙𝑜𝑤(𝐴)𝐹𝑜𝑙𝑙𝑜𝑤(𝐴).

  4. D.

    If there is any input right end marker, it will be added to 𝐹𝑜𝑙𝑙𝑜𝑤(𝑆)𝐹𝑜𝑙𝑙𝑜𝑤(𝑆), where SS is the start symbol.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A, D

Solutions and video are in the course

Question 47 · 2 marks Q6293

Consider a relational schema 𝑡𝑒𝑎𝑚(𝑛𝑎𝑚𝑒,𝑐𝑖𝑡𝑦,𝑜𝑤𝑛𝑒𝑟)𝑡𝑒𝑎𝑚(𝑛𝑎𝑚𝑒, 𝑐𝑖𝑡𝑦, 𝑜𝑤𝑛𝑒𝑟), with functional dependencies {𝑛𝑎𝑚𝑒→𝑐𝑖𝑡𝑦,𝑛𝑎𝑚𝑒→𝑜𝑤𝑛𝑒𝑟}\{𝑛𝑎𝑚𝑒 → 𝑐𝑖𝑡𝑦, 𝑛𝑎𝑚𝑒 → 𝑜𝑤𝑛𝑒𝑟\}.

The relation 𝑡𝑒𝑎𝑚𝑡𝑒𝑎𝑚 is decomposed into two relations, 𝑡1(𝑛𝑎𝑚𝑒,𝑐𝑖𝑡𝑦)𝑡1(𝑛𝑎𝑚𝑒, 𝑐𝑖𝑡𝑦) and 𝑡2(𝑛𝑎𝑚𝑒,𝑜𝑤𝑛𝑒𝑟)𝑡2(𝑛𝑎𝑚𝑒, 𝑜𝑤𝑛𝑒𝑟). Which of the following statement(s) is/are TRUE?

  1. A.

    The relation 𝑡𝑒𝑎𝑚𝑡𝑒𝑎𝑚 is NOT in BCNF.

  2. B.

    The relations t1t1 and t2t2 are in BCNF.

  3. C.

    The decomposition constitutes a lossless join.

  4. D.

    The relation 𝑡𝑒𝑎𝑚𝑡𝑒𝑎𝑚 is NOT in 3NF.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B, C

Solutions and video are in the course

Question 48 · 2 marks Q6294

Which of the following predicate logic formulae/formula is/are CORRECT representation(s) of the statement: “Everyone has exactly one mother”?

The meanings of the predicates used are:

• 𝑚𝑜𝑡h𝑒𝑟(𝑦,𝑥):𝑦𝑚𝑜𝑡ℎ𝑒𝑟(𝑦, 𝑥): 𝑦 is the mother of xx

• 𝑛𝑜𝑡𝑒𝑞(𝑥,𝑦):𝑥𝑛𝑜𝑡𝑒𝑞(𝑥, 𝑦): 𝑥 and yy are not equal

  1. A.

    ∀𝑥∃𝑦∃𝑧(𝑚𝑜𝑡h𝑒𝑟(𝑦,𝑥)∧¬𝑚𝑜𝑡h𝑒𝑟(𝑧,𝑥))∀𝑥∃𝑦∃𝑧(𝑚𝑜𝑡ℎ𝑒𝑟(𝑦, 𝑥) ∧ ¬𝑚𝑜𝑡ℎ𝑒𝑟(𝑧, 𝑥))

  2. B.

    ∀𝑥∃𝑦[𝑚𝑜𝑡h𝑒𝑟(𝑦,𝑥)∧∀𝑧(𝑛𝑜𝑡𝑒𝑞(𝑧,𝑦)→¬𝑚𝑜𝑡h𝑒𝑟(𝑧,𝑥))]∀𝑥∃𝑦[𝑚𝑜𝑡ℎ𝑒𝑟(𝑦, 𝑥) ∧ ∀𝑧(𝑛𝑜𝑡𝑒𝑞(𝑧, 𝑦) → ¬𝑚𝑜𝑡ℎ𝑒𝑟(𝑧, 𝑥))]

  3. C.

    ∀𝑥∀𝑦[𝑚𝑜𝑡h𝑒𝑟(𝑦,𝑥)→∃𝑧(𝑚𝑜𝑡h𝑒𝑟(𝑧,𝑥)∧¬𝑛𝑜𝑡𝑒𝑞(𝑧,𝑦))]∀𝑥∀𝑦[𝑚𝑜𝑡ℎ𝑒𝑟(𝑦, 𝑥) → ∃𝑧(𝑚𝑜𝑡ℎ𝑒𝑟(𝑧, 𝑥) ∧ ¬𝑛𝑜𝑡𝑒𝑞(𝑧, 𝑦))]

  4. D.

    ∀𝑥∃𝑦[𝑚𝑜𝑡h𝑒𝑟(𝑦,𝑥)∧¬∃𝑧(𝑛𝑜𝑡𝑒𝑞(𝑧,𝑦)∧𝑚𝑜𝑡h𝑒𝑟(𝑧,𝑥))]∀𝑥∃𝑦[𝑚𝑜𝑡ℎ𝑒𝑟(𝑦, 𝑥) ∧ ¬∃𝑧(𝑛𝑜𝑡𝑒𝑞(𝑧, 𝑦) ∧ 𝑚𝑜𝑡ℎ𝑒𝑟(𝑧, 𝑥))]

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B, D

Solutions and video are in the course

Question 49 · 2 marks Q6295

𝐴={0,1,2,3,…}𝐴 = \{0, 1, 2, 3, … \} is the set of non-negative integers. Let FF be the set of functions from AA to itself. For any two functions, 𝑓1,𝑓2∈Ϝ𝑓_1, 𝑓_2 ∈ Ϝ, we define

(𝑓1⨀𝑓2)(𝑛)=𝑓1(𝑛)+𝑓2(𝑛)(𝑓_1⨀𝑓_2)(𝑛) = 𝑓_1(𝑛) + 𝑓_2(𝑛)

for every number nn in AA. Which of the following is/are CORRECT about the mathematical structure (Ϝ,⨀)(Ϝ, ⨀)?

  1. A.

    (Ϝ,⨀)(Ϝ, ⨀) is an Abelian group.

  2. B.

    (Ϝ,⨀)(Ϝ, ⨀) is an Abelian monoid.

  3. C.

    (Ϝ,⨀)(Ϝ, ⨀) is a non-Abelian group.

  4. D.

    (Ϝ,⨀)(Ϝ, ⨀) is a non-Abelian monoid.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B

Solutions and video are in the course

Question 50 · 2 marks Q6296

Consider the following deterministic finite automaton (DFA) defined over the alphabet, Σ={𝑎,𝑏}Σ = \{𝑎, 𝑏\}. Identify which of the following language(s) is/are accepted by the given DFA.

  1. A.

    The set of all strings containing an even number of 𝑏𝑏’s.

  2. B.

    The set of all strings containing the pattern 𝑏𝑎𝑏𝑏𝑎𝑏.

  3. C.

    The set of all strings ending with the pattern 𝑏𝑎𝑏𝑏𝑎𝑏.

  4. D.

    The set of all strings not containing the pattern 𝑎𝑏𝑎𝑎𝑏𝑎.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 51 · 2 marks Q1853

A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, 1K = 210 and 1M = 220 . The amount of space in bytes that will be wasted due to internal fragmentation is ______.(Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 65468 bytes

Solutions and video are in the course

Question 52 · 2 marks Q6298

Refer to the given 3-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is ________. (Answer in integer)

1001:i=11002:j=11003:t1=10⋅i1004:t2=t1+j1005:t3=8⋅t21006:t4=t3−881007:a[t4]=0.01008:j=j+11009:if j≤10 goto 10031010:i=i+11011:if i≤10 goto 10021012:i=11013:t5=i−11014:t6=88⋅t51015:a[t6]=1.01016:i=i+11017:if i≤10 goto 1013\begin{aligned} &1001: \quad i = 1 \\ &1002: \quad j = 1 \\ &1003: \quad t1 = 10 \cdot i \\ &1004: \quad t2 = t1 + j \\ &1005: \quad t3 = 8 \cdot t2 \\ &1006: \quad t4 = t3 - 88 \\ &1007: \quad a[t4] = 0.0 \\ &1008: \quad j = j + 1 \\ &1009: \quad \text{if } j \leq 10 \text{ goto } 1003 \\ &1010: \quad i = i + 1 \\ &1011: \quad \text{if } i \leq 10 \text{ goto } 1002 \\ &1012: \quad i = 1 \\ &1013: \quad t5 = i - 1 \\ &1014: \quad t6 = 88 \cdot t5 \\ &1015: \quad a[t6] = 1.0 \\ &1016: \quad i = i + 1 \\ &1017: \quad \text{if } i \leq 10 \text{ goto } 1013 \end{aligned}

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 6

Solutions and video are in the course

Question 53 · 2 marks Q6299

A computer has a memory hierarchy consisting of two-level cache (L1 and L2) and a main memory. If the processor needs to access data from memory, it first looks into L1 cache. If the data is not found in L1 cache, it goes to L2 cache. If it fails to get the data from L2 cache, it goes to main memory, where the data is definitely available. Hit rates and access times of various memory units are shown in the figure. The average memory access time in nanoseconds (ns) is ________. (rounded off to two decimal places)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 11.83 to 11.87 ns

Solutions and video are in the course

Question 54 · 2 marks Q1902

In optimal page replacement algorithm, information about all future page references is available to the operating system (OS). A modification of the optimal page replacement algorithm is as follows: 

The OS correctly predicts only up to next 4 page references (including the current page) at the time of allocating a frame to a page. 

A process accesses the pages in the following order of page numbers:

1, 3, 2, 4, 2, 3, 1, 2, 4, 3, 1, 4.

If the system has three memory frames that are initially empty, the number of page faults that will occur during execution of the process is ________ . (Answer in integer)?


Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 6

Solutions and video are in the course

Question 55 · 2 marks Q6301

Consider the following database tables of a sports league.

player(pid,pname,age)team(tid,tname,city,cid)coach(cid,cname)members(pid,tid) \begin{array}{l l} \textbf{player}(\text{pid}, \text{pname}, \text{age}) & \textbf{team}(\text{tid}, \text{tname}, \text{city}, \text{cid}) \\ \textbf{coach}(\text{cid}, \text{cname}) & \textbf{members}(\text{pid}, \text{tid}) \end{array}

An instance of the table and an SQL query are given.

SELECT MIN(P.age)FROM player PWHERE P.pid IN (SELECT M.pidFROM team T,coach C,members MWHERE C.cname=′Mark′AND T.cid=C.cidAND M.tid=T.tid )\begin{aligned} &\text{SELECT } \text{MIN}(P.\text{age}) \\ &\text{FROM } \textbf{player} \ P \\ &\text{WHERE } P.\text{pid} \text{ IN } ( \\ &\quad \text{SELECT } M.\text{pid} \\ &\quad \text{FROM } \textbf{team} \ T, \textbf{coach} \ C, \textbf{members} \ M \\ &\quad \text{WHERE } C.\text{cname} = 'Mark' \\ &\quad \text{AND } T.\text{cid} = C.\text{cid} \\ &\quad \text{AND } M.\text{tid} = T.\text{tid} \ ) \end{aligned}

The value returned by the given SQL query is ______ . (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 26

Solutions and video are in the course

Question 56 · 2 marks Q6302

Suppose a 5-bit message is transmitted from a source to a destination through a noisy channel. The probability that a bit of the message gets flipped during transmission is 0.01. Flipping of each bit is independent of one another. The probability that the message is delivered error-free to the destination is ______ . (rounded off to three decimal places)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 0.949 to 0.952

Solutions and video are in the course

Question 57 · 2 marks Q6303

Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is ________ . (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 7

Solutions and video are in the course

Question 58 · 2 marks Q6304

Consider a probability distribution given by the density function 𝑃(𝑥)𝑃(𝑥).

P(x)={Cx2,for 1≤x≤40,for x<1 or x>4P(x) = \begin{cases} Cx^2, & \text{for } 1 \leq x \leq 4 \\ 0, & \text{for } x < 1 \text{ or } x > 4 \end{cases}

The probability that xx lies between 2 and 3, i.e., 𝑃(2≤𝑥≤3)𝑃(2 ≤ 𝑥 ≤ 3) is __________. (rounded off to three decimal places)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 0.3 to 0.302

Solutions and video are in the course

Question 59 · 2 marks Q6305

Consider a finite state machine (FSM) with one input XX and one output 𝑓𝑓, represented by the given state transition table. The minimum number of states required to realize this FSM is ________. (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 5 states

Solutions and video are in the course

Question 60 · 2 marks Q6306

Consider the given sequential circuit designed using D-Flip-flops. The circuit is initialized with some value (initial state). The number of distinct states the circuit will go through before returning back to the initial state is _________ . (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 7 to 8

Solutions and video are in the course

Question 61 · 2 marks Q6307

#include <stdio.h>

int foo(int S[], int size) {

if(size == 0) return 0;

if(size == 1) return 1;

if(S[0] != S[1]) return 1 + foo(S + 1, size - 1);

return foo(S + 1, size - 1);

}

int main() {

int A[] = {0, 1, 2, 2, 2, 0, 0, 1, 1};

printf("%d", foo(A, 9));

return 0;

}

The value printed by the given C program is _______ . (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 5

Solutions and video are in the course

Question 62 · 2 marks Q6308

Let LISTLIST be a datatype for an implementation of linked list defined as follows:

typedef struct list {int data;struct list *next;} LIST;\begin{array}{l} \text{typedef struct list \{} \\ \quad \text{int data;} \\ \quad \text{struct list *next;} \\ \text{\} LIST;} \end{array}

Suppose a program has created two linked lists, L1 and L2, whose contents are given in the figure below (code for creating L1 and L2 is not provided here). L1 contains 9 nodes, and L2 contains 7 nodes. Consider the following C program segment that modifies the list L1. The number of nodes that will be there in L1 after the execution of the code segment is ________ . (Answer in integer)

int find (int query, LIST *list) {while (list != NULL) {if (list->data == query) return 1;list = list->next;}return 0;}int main () {... ... ...ptr1 = L1; ptr2 = L2;while (ptr1->next != NULL) {query = ptr1->next->data;if (find (query, L2))ptr1->next = ptr1->next->next;else ptr1 = ptr1->next;}... ... ...return 0;}\begin{array}{l} \text{int find (int query, LIST *list) \{} \\ \quad \text{while (list != NULL) \{} \\ \quad\quad \text{if (list->data == query) return 1;} \\ \quad\quad \text{list = list->next;} \\ \quad \text{\}} \\ \quad \text{return 0;} \\ \text{\}} \\[10pt] \text{int main () \{} \\ \quad \text{... ... ...} \\ \quad \text{ptr1 = L1; ptr2 = L2;} \\ \quad \text{while (ptr1->next != NULL) \{} \\ \quad\quad \text{query = ptr1->next->data;} \\ \quad\quad \text{if (find (query, L2))} \\ \quad\quad\quad \text{ptr1->next = ptr1->next->next;} \\ \quad\quad \text{else ptr1 = ptr1->next;} \\ \quad \text{\}} \\ \quad \text{... ... ...} \\ \quad \text{return 0;} \\ \text{\}} \end{array}

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 5

Solutions and video are in the course

Question 63 · 2 marks Q6309

Consider the following C program:

#include <stdio.h>

int gate (int n) {

int d, t, newnum, turn;

newnum = turn = 0; t=1;

while (n>=t) t *= 10;

t /=10;

while (t>0) {

d = n/t;

n = n%t;

t /= 10;

if (turn) newnum = 10*newnum + d;

turn = (turn + 1) % 2;

}

return newnum;

}

int main () {

printf ("%d", gate(14362));

return 0;

}

The value printed by the given C program is _______ . (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 46

Solutions and video are in the course

Question 64 · 2 marks Q6310

The maximum value of 𝑥 such that the edge between the nodes B and C is included in every minimum spanning tree of the given graph is _________ . (answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 5

Solutions and video are in the course

Question 65 · 2 marks Q6311

In a double hashing scheme, h1(𝑘)=𝑘 mod 11ℎ_1 (𝑘) = 𝑘 \ mod \ 11 and h2(𝑘)=1+(𝑘 mod 7)ℎ_2 (𝑘) = 1 + (𝑘 \ mod \ 7) are the auxiliary hash functions. The size mm of the hash table is 11. The hash function for the ii-th probe in the open address table is [h1(𝑘)+𝑖 h2(𝑘)] mod 𝑚[ℎ_1 (𝑘) + 𝑖 \ ℎ_2(𝑘)] \ mod \ 𝑚. The following keys are inserted in the given order: 63, 50, 25, 79, 67, 24.

The slot at which key 24 gets stored is ___________. (Answer in integer)

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): 10 to 11

Solutions and video are in the course

Question 1 · 1 mark Q6247

Ravi had ______ younger brother who taught at ______ university. He was widely regarded as ______ honorable man.

Select the option with the correct sequence of articles to fill in the blanks.

  1. A.

    a; a; an

  2. B.

    the; an; a

  3. C.

    a; an; a

  4. D.

    an; an; a

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 2 · 1 mark Q6248

The CEO’s decision to downsize the workforce was considered myopic because it sacrificed long-term stability to accommodate short-term gains.

Select the most appropriate option that can replace the word “myopic” without changing the meaning of the sentence.

  1. A.

    visionary

  2. B.

    shortsighted

  3. C.

    progressive

  4. D.

    innovative

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B

Solutions and video are in the course

Question 3 · 1 mark Q6249

The average marks obtained by a class in an examination were calculated as 30.8. However, while checking the marks entered, the teacher found that the marks of one student were entered incorrectly as 24 instead of 42. After correcting the marks, the average becomes 31.4. How many students does the class have?

  1. A.

    25

  2. B.

    28

  3. C.

    30

  4. D.

    32

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 4 · 1 mark Q6250

Consider the relationships among P, Q, R, S, and T:

• P is the brother of Q.

• S is the daughter of Q.

• T is the sister of S.

• R is the mother of Q.

The following statements are made based on the relationships given above.

(1) R is the grandmother of S.

(2) P is the uncle of S and T.

(3) R has only one son.

(4) Q has only one daughter.

Which one of the following options is correct?

  1. A.

    Both (1) and (2) are true.

  2. B.

    Both (1) and (3) are true.

  3. C.

    Only (3) is true.

  4. D.

    Only (4) is true.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 5 · 1 mark Q6251

According to the map shown in the figure, which one of the following statements is correct?

Note: The figure shown is representative.

  1. A.

    The library is located to the northwest of the canteen.

  2. B.

    The hospital is located to the east of the chemistry lab.

  3. C.

    The chemistry lab is to the southeast of physics lab.

  4. D.

    The classrooms and canteen are next to each other.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 6 · 2 marks Q6252

“I put the brown paper in my pocket along with the chalks, and possibly other things. I suppose every one must have reflected how primeval and how poetical are the things that one carries in one’s pocket: the pocket-knife, for instance the type of all human tools, the infant of the sword. Once I planned to write a book of poems entirely about the things in my pocket. But I found it would be too long: and the age of the great epics is past.”

(From G.K. Chesterton’s “A Piece of Chalk”)

Based only on the information provided in the above passage, which one of the following statements is true?

  1. A.

    The author of the passage carries a mirror in his pocket to reflect upon things.

  2. B.

    The author of the passage had decided to write a poem on epics.

  3. C.

    The pocket-knife is described as the infant of the sword.

  4. D.

    Epics are described as too inconvenient to write.

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): C

Solutions and video are in the course

Question 7 · 2 marks Q6253

In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and line QR. What is the ratio of the area of the triangle PST to the area of the trapezium SQRT?

Note: The figure shown is representative.

  1. A.

    131\over 3

  2. B.

    141\over 4

  3. C.

    252 \over 5

  4. D.

    121\over 2

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 8 · 2 marks Q6254

A fair six-faced dice, with the faces labelled ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, and ‘6’, is rolled thrice. What is the probability of rolling ‘6’ exactly once?

  1. A.

    7521675 \over {216}

  2. B.

    161 \over {6}

  3. C.

    1181 \over {18}

  4. D.

    2521625 \over {216}

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 9 · 2 marks Q6255

A square paper, shown in figure (I), is folded along the dotted lines as shown in the figures (II) and (III). Then a few cuts are made as shown in figure (IV). Which one of the following patterns will be obtained when the paper is unfolded?

Note: The figures shown are representative.

  1. A.
  2. B.
  3. C.
  4. D.
Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): A

Solutions and video are in the course

Question 10 · 2 marks Q6256

A shop has 4 distinct flavors of ice-cream. One can purchase any number of scoops of any flavor. The order in which the scoops are purchased is inconsequential. If one wants to purchase 3 scoops of ice-cream, in how many ways can one make that purchase?

  1. A.

    4

  2. B.

    20

  3. C.

    24

  4. D.

    48

Official answer key

Official answer key (GATE Computer Science & IT 2025 GATE 2025 · CS · Set 1): B

Solutions and video are in the course