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

CS Set 1 · 65 of 65 questions publicly available

Sections: General Aptitude, Computer Science & IT

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

Question 11 · 1 mark Q2090

Let 𝑓: ℝ → ℝ be a function such that 𝑓(𝑥) = max{𝑥, x3x^3 }, 𝑥 ∈ ℝ , where ℝ is the set of all real numbers. The set of all points where 𝑓(𝑥) is NOT differentiable is    

  1. A.

    {−1, 1, 2}

  2. B.

    {−2, −1, 1}

  3. C.

    {0, 1}

  4. D.

    {−1, 0, 1}

Official answer key

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

Solutions and video are in the course

Question 12 · 1 mark Q2091

The product of all eigenvalues of the matrix [123456789]\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \\ \end{bmatrix} is

  1. A.

    −1

  2. B.

    0

  3. C.

    1

  4. D.

    2

Official answer key

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

Solutions and video are in the course

Question 13 · 1 mark Q2092

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 𝐴=01010 and 𝐵=11010. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?

  1. A.

    A + B

  2. B.

    A - B

  3. C.

    B - A

  4. D.

    2 * B

Official answer key

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

Solutions and video are in the course

Question 14 · 1 mark Q2093

Consider a permutation sampled uniformly at random from the set of all permutations of {1, 2, 3, ⋯ , 𝑛} for some 𝑛 ≥ 4. Let 𝑋 be the event that 1 occurs before 2 in the permutation, and 𝑌 the event that 3 occurs before 4. Which one of the following statements is TRUE?

  1. A.

    The events 𝑋 and 𝑌 are mutually exclusive

  2. B.

    The events 𝑋 and 𝑌 are independent

  3. C.

    Either event 𝑋 or 𝑌 must occur

  4. D.

    Event 𝑋 is more likely than event 𝑌

Official answer key

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

Solutions and video are in the course

Question 15 · 1 mark Q2094

Which one of the following statements is FALSE?

  1. A.

    In the cycle stealing mode of DMA, one word of data is transferred between an I/O device and main memory in a stolen cycle

  2. B.

    For bulk data transfer, the burst mode of DMA has a higher throughput than the cycle stealing mode

  3. C.

    Programmed I/O mechanism has a better CPU utilization than the interrupt driven I/O mechanism

  4. D.

    The CPU can start executing an interrupt service routine faster with vectored interrupts than with non-vectored interrupts

Official answer key

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

Solutions and video are in the course

Question 16 · 1 mark Q2095

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-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user’s computer in some order.

(i) HTTP GET request for the index page

(ii) DNS request to resolve the web server’s name to its IP address

(iii) HTTP GET request for an image object

(iv) TCP SYN to open a connection to the web server

Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?

  1. A.

    (iv), (ii), (iii), (i)

  2. B.

    (ii), (iv), (iii), (i)

  3. C.

    (ii), (iv), (i), (iii)

  4. D.

    (iv), (ii), (i), (iii)

Official answer key

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

Solutions and video are in the course

Question 17 · 1 mark Q2096

Given an integer array of size N, 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 through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is

  1. A.

    both Ο(𝑁) and Ω(𝑁)

  2. B.

    Ο(𝑁) but not Ω(𝑁)

  3. C.

    Ω(𝑁) but not Ο(𝑁)

  4. D.

    neither Ο(𝑁) nor Ω(𝑁)

Official answer key

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

Solutions and video are in the course

Question 18 · 1 mark Q2097

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 following statements is CORRECT?

  1. A.

    The program prints 9 as output

  2. B.

    The program prints 10 as output

  3. C.

    The program gets stuck in an infinite loop

  4. D.

    The program prints 6 as output

Official answer key

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

Solutions and video are in the course

Question 19 · 1 mark Q2098

Consider the following C program:

Assume that the input to the program from the command line is 1234 followed by a newline character. Which one of the following statements is CORRECT?

  1. A.

    The program will not terminate

  2. B.

    The program will terminate with no output

  3. C.

    The program will terminate with 4321 as output

  4. D.

    The program will terminate with 1234 as output

Official answer key

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

Solutions and video are in the course

Question 20 · 1 mark Q2037

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 diagrams CORRECTLY represents S?

Four ER diagrams: (i) draws Registration as a rectangle and Student as a diamond; (ii) has Projects instead of Student; (iii) connects Classroom directly to Course; (iv) shows Instructor, Course, Classroom, and Student entities with Teaches, Allocation, Registration, and Guides relationships.

  1. A.

    (i)

  2. B.

    (ii)

  3. C.

    (iii)

  4. D.

    (iv)

Official answer key

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

Solutions and video are in the course

Question 21 · 1 mark Q2100

In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?

  1. A.

    Only the root node

  2. B.

    All leaf nodes

  3. C.

    All internal nodes

  4. D.

    Only the leftmost leaf node

Official answer key

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

Solutions and video are in the course

Question 22 · 1 mark Q2057

Which of the following statements about a relation R in first normal form (1NF) is/are TRUE?

  1. A.

    R can have a multi-attribute key

  2. B.

    R cannot have a foreign key

  3. C.

    R cannot have a composite attribute

  4. D.

    R cannot have more than one candidate key

Official answer key

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

Solutions and video are in the course

Question 23 · 1 mark Q2102

Let L1L_1 , L2L_2  be two regular languages and L3L_3 a language which is not regular. Which of the following statements is/are always TRUE?

  1. A.

    L1=L2L_1 = L_2  if and only if  L1∩L2‾=𝜙 {L_1 \cap \overline{L_2}} = \text{𝜙}

  2. B.

    𝐿1 ∪ 𝐿3 is not regular

  3. C.

    L3‾\overline{L_3} is not regular

  4. D.

    L1‾∪L2‾\overline{L_1} ∪ \overline{L_2} is regular

Official answer key

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

Solutions and video are in the course

Question 24 · 1 mark Q2103

Which of the following statements about threads is/are TRUE?

  1. A.

    Threads can only be implemented in kernel space

  2. B.

    Each thread has its own file descriptor table for open files

  3. C.

    All the threads belonging to a process share a common stack

  4. D.

    Threads belonging to a process are by default not protected from each other

Official answer key

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

Solutions and video are in the course

Question 25 · 1 mark Q2104

Which of the following process state transitions is/are NOT possible?

  1. A.

    Running to Ready

  2. B.

    Waiting to Running

  3. C.

    Ready to Waiting

  4. D.

    Running to Terminated

Official answer key

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

Solutions and video are in the course

Question 26 · 1 mark Q2105

Which of the following is/are Bottom-Up Parser(s)?

  1. A.

    Shift-reduce Parser

  2. B.

    Predictive Parser

  3. C.

    LL(1) Parser

  4. D.

    LR Parser

Official answer key

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

Solutions and video are in the course

Question 27 · 1 mark Q2106

Let 𝐴 and 𝐵 be two events in a probability space with 𝑃(𝐴) = 0.3, 𝑃(𝐵) = 0.5, and 𝑃(𝐴 ∩ 𝐵) = 0.1. Which of the following statements is/are TRUE?

  1. A.

    The two events 𝐴 and 𝐵 are independent

  2. B.

    𝑃(𝐴 ∪ 𝐵) = 0.7

  3. C.

    P(A∩Bc)P(A \cap B^c)  = 0.2, where BcB^c is the complement of the event B

  4. D.

    P(Ac∩Bc)P(A^c \cap B^c)  = 0.4, where AcA^c and BcB^c are the complements of the events 𝐴 and 𝐵, respectively

Official answer key

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

Solutions and video are in the course

Question 28 · 1 mark Q2107

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 the following statements about the circuit is/are CORRECT?

  1. A.

    With no propagation delays, the output 𝒀 is always logic Zero

  2. B.

    With no propagation delays, the output 𝒀 is always logic One

  3. C.

    With propagation delays, the output 𝒀 can have a transient logic One after 𝑿 transitions from logic Zero to logic One

  4. D.

    With propagation delays, the output 𝒀 can have a transient logic Zero after 𝑿 transitions from logic One to logic Zero

Official answer key

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

Solutions and video are in the course

Question 29 · 1 mark Q2108

TCP client P successfully establishes a connection to TCP server Q. Let NPN_P denote the sequence number in the SYN sent from P to Q. Let NQN_Q denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?    

  1. A.

    The sequence number NPN_P is chosen randomly by P

  2. B.

    The sequence number NPN_P is always 0 for a new connection

  3. C.

    The acknowledgement number NQN_Q is equal to NPN_P

  4. D.

    The acknowledgement number NQN_Q is equal to NPN_P + 1

Official answer key

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

Solutions and video are in the course

Question 30 · 1 mark Q2109

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 following statements about forwarding is/are CORRECT?

  1. A.

    In a pipelined execution, forwarding means the result from a source stage of an earlier instruction is passed on to the destination stage of a later instruction

  2. B.

    In forwarding, data from the output of the MEM stage can be passed on to the input of the EX stage of the next instruction

  3. C.

    Forwarding cannot prevent all pipeline stalls

  4. D.

    Forwarding does not require any extra hardware to retrieve the data from the pipeline stages

Official answer key

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

Solutions and video are in the course

Question 31 · 1 mark Q2110

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?

  1. A.

    Source IP

  2. B.

    Destination IP

  3. C.

    Header Checksum

  4. D.

    Total Length

Official answer key

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

Solutions and video are in the course

Question 32 · 1 mark Q2111

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 values of |𝐴| is __________

Official answer key

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

Solutions and video are in the course

Question 33 · 1 mark Q2112

Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below.

Operator

Precedence

Associativity

+

Highest

Left

−

High

Right

*

Medium

Right

/

Low

Right

The value of the expression 3 + 1 + 5 ∗ 2 / 7 + 2 − 4 − 7 − 6 / 2 as per the above rules is __________

Official answer key

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

Solutions and video are in the course

Question 34 · 1 mark Q2113

The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is ________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 16

Solutions and video are in the course

Question 35 · 1 mark Q2114

Consider the following two relations, R(A,B) and S(A,C):

R

A

B

10

20

20

30

30

40

30

50

50

95

S

A

C

10

90

30

45

40

80

The total number of tuples obtained by evaluating the following expression

σB<C ⁣(R⋈R.A=S.AS)\sigma_{B<C}\!\left(R\bowtie_{R.A=S.A}S\right)

is _________

Official answer key

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

Solutions and video are in the course

Question 36 · 2 marks Q2115

Consider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size 10^6 bytes to R via this path by splitting the file into chunks of 10^3 bytes each. Node P sends these chunks one after the other without any wait time between the successive chunk transmissions. Assume that the size of extra headers added to these chunks is negligible, and that the chunk size is less than the MTU.

Each of the links P—Q and Q—R has a bandwidth of 10^6 bits/sec, and negligible propagation latency. Router Q immediately transmits every packet it receives from P to R, with negligible processing and queueing delays. Router Q can simultaneously receive on link P—Q and transmit on link Q—R.

Assume P starts transmitting the chunks at time 𝑡 = 0. Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which R receives all the chunks of the file?   

  1. A.

    8.000

  2. B.

    8.008

  3. C.

    15.992

  4. D.

    16.000

Official answer key

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

Solutions and video are in the course

Question 37 · 2 marks Q2116

Consider the following syntax-directed definition (SDD).

image.png

Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute 𝑆. 𝑣𝑎𝑙)?

  1. A.

    45

  2. B.

    50

  3. C.

    55

  4. D.

    65

Official answer key

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

Solutions and video are in the course

Question 38 · 2 marks Q2117

Consider the following grammar 𝐺, with 𝑆 as the start symbol. The grammar 𝐺 has three incomplete productions denoted by (1), (2), and (3).

                          𝑆 → 𝑑𝑎𝑇 | (1)

                          𝑇 → 𝑎𝑆 | 𝑏𝑇 | (2)

                          𝑅 → (3) | 𝜖

The set of terminals is {𝑎, 𝑏, 𝑐, 𝑑, 𝑓}. The FIRST and FOLLOW sets of the different non-terminals are as follows.

                FIRST(𝑆) = {𝑐, 𝑑, 𝑓}, FIRST(𝑇) = {𝑎, 𝑏, 𝜖}, FIRST(𝑅) = {𝑐, 𝜖}

                 FOLLOW(𝑆) = FOLLOW(𝑇) = {𝑐, 𝑓, $}, FOLLOW(𝑅) = {𝑓}

Which one of the following options CORRECTLY fills in the incomplete productions?

  1. A.

    (1) 𝑆 → 𝑅𝑓 (2) 𝑇 → 𝜖 (3) 𝑅 → 𝑐𝑇𝑅

  2. B.

    (1) 𝑆 → 𝑓𝑅 (2) 𝑇 → 𝜖 (3) 𝑅 → 𝑐𝑇𝑅

  3. C.

    (1) 𝑆 → 𝑓𝑅 (2) 𝑇 → 𝑐𝑇 (3) 𝑅 → 𝑐𝑅

  4. D.

    (1) 𝑆 → 𝑅𝑓 (2) 𝑇 → 𝑐𝑇 (3) 𝑅 → 𝑐𝑅

Official answer key

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

Solutions and video are in the course

Question 39 · 2 marks Q2118

Consider the following pseudo-code.

        𝐿1: 𝑡1 = −1

        𝐿2: 𝑡2 = 0

        𝐿3: 𝑡3 = 0

        𝐿4: 𝑡4 = 4 ∗ 𝑡3

        𝐿5: 𝑡5 = 4 ∗ 𝑡2

        𝐿6: 𝑡6 = 𝑡5 ∗ 𝑀

        𝐿7: 𝑡7 = 𝑡4 + 𝑡6

        𝐿8: 𝑡8 = 𝑎[𝑡7]

        𝐿9: if 𝑡8 <= 𝑚𝑎𝑥 goto 𝐿11

        𝐿10: 𝑡1 = 𝑡8

        𝐿11: 𝑡3 = 𝑡3 + 1

        𝐿12: if 𝑡3 < 𝑀 goto 𝐿4

        𝐿13: 𝑡2 = 𝑡2 + 1

        𝐿14: if 𝑡2 < 𝑁 goto 𝐿3

        𝐿15: 𝑚𝑎𝑥 = 𝑡1

Which one of the following options CORRECTLY specifies the number of basic

blocks and the number of instructions in the largest basic block, respectively ?

  1. A.

    6 and 6

  2. B.

    6 and 7

  3. C.

    7 and 7

  4. D.

    7 and 6

Official answer key

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

Solutions and video are in the course

Question 40 · 2 marks Q2119

Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a = b = 1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption.

            T1                                  T2

       a = a + 1;                       b = 2 * b;

       b = b + 1;                       a = 2 * a;

Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?

  1. A.

    (a = 4, b = 4); (a = 3, b = 3); (a = 4, b = 3)

  2. B.

    (a = 3, b = 4); (a = 4, b = 3); (a = 3, b = 3)

  3. C.

    (a = 4, b = 4); (a = 4, b = 3); (a = 3, b = 4)

  4. D.

    (a = 2, b = 2); (a = 2, b = 3); (a = 3, b = 4)

Official answer key

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

Solutions and video are in the course

Question 41 · 2 marks Q2120

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?

  1. A.

    82, 90, 101

  2. B.

    82, 11, 93

  3. C.

    131, 11, 93

  4. D.

    131, 111, 90

Official answer key

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

Solutions and video are in the course

Question 42 · 2 marks Q2121

Consider the following recurrence relation:

T(n)={n⋅T(n)+nfor n≥11for n=1T(n) = \begin{cases} \sqrt{n} \cdot T(\sqrt{n}) + n & \text{for } n \geq 1 \\ 1 & \text{for } n = 1 \end{cases}

Which one of the following options is CORRECT?

  1. A.

    𝑇(𝑛) = Θ(𝑛 log log 𝑛)

  2. B.

    𝑇(𝑛) = Θ(𝑛 log 𝑛)

  3. C.

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

  4. D.

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

Official answer key

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

Solutions and video are in the course

Question 43 · 2 marks Q2122

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 values of 𝑘 is

  1. A.

    53

  2. B.

    52

  3. C.

    27

  4. D.

    1

Official answer key

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

Solutions and video are in the course

Question 44 · 2 marks Q2123

The symbol → indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?

  1. A.

    (𝑋, 𝑌) → (𝑍, 𝑊) implies 𝑋 → (𝑍, 𝑊)

  2. B.

    (𝑋, 𝑌) → (𝑍, 𝑊) implies (𝑋, 𝑌) → 𝑍

  3. C.

    ((𝑋, 𝑌) → 𝑍 and 𝑊 → 𝑌) implies (𝑋, 𝑊) → 𝑍

  4. D.

    (𝑋 → 𝑌 and 𝑌 → 𝑍) implies 𝑋 → 𝑍

Official answer key

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

Solutions and video are in the course

Question 45 · 2 marks Q2124

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 𝐺, rooted at 𝑣. Which of the following statements is/are TRUE for every such graph 𝐺 and tree 𝑇 ?    

  1. A.

    There are no back-edges in 𝐺 with respect to the tree 𝑇

  2. B.

    There are no cross-edges in 𝐺 with respect to the tree 𝑇

  3. C.

    There are no forward-edges in 𝐺 with respect to the tree 𝑇

  4. D.

    The only edges in 𝐺 are the edges in 𝑇

Official answer key

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

Solutions and video are in the course

Question 46 · 2 marks Q2125

Consider the following read-write schedule 𝑆 over three transactions 𝑇1, 𝑇2, and 𝑇3, where the subscripts in the schedule indicate transaction IDs:

       𝑆: 𝑟1(𝑧); 𝑤1(𝑧); 𝑟2(𝑥); 𝑟3(𝑦); 𝑤3(𝑦); 𝑟2(𝑦); 𝑤2(𝑥); 𝑤2(𝑦);

Which of the following transaction schedules is/are conflict equivalent to 𝑆 ?

  1. A.

    T1T2T3T_1 T_2 T_3

  2. B.

    T1T3T2T_1 T_3 T_2

  3. C.

    T3T2T1T_3 T_2 T_1

  4. D.

    T3T1T2T_3 T_1 T_2

Official answer key

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

Solutions and video are in the course

Question 47 · 2 marks Q2126

Consider a Boolean expression given by 𝐹(𝑋, 𝑌, 𝑍) = ∑(3,5,6,7).

Which of the following statements is/are CORRECT?

  1. A.

    𝐹(𝑋, 𝑌, 𝑍) = Π(0,1,2,4)

  2. B.

    𝐹(𝑋, 𝑌, 𝑍) = 𝑋𝑌 + 𝑌𝑍 +𝑋𝑍

  3. C.

    𝐹(𝑋, 𝑌, 𝑍) is independent of input 𝑌

  4. D.

    𝐹(𝑋, 𝑌, 𝑍) is independent of input 𝑋

Official answer key

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

Solutions and video are in the course

Question 48 · 2 marks Q2127

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 above function?

  1. A.

    If the inputs are x=20, y=10, then the return value is greater than 220

  2. B.

    If the inputs are x=20, y=20, then the return value is greater than 220

  3. C.

    If the inputs are x=20, y=10, then the return value is less than 210

  4. D.

    If the inputs are x=10, y=20, then the return value is greater than 220

Official answer key

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

Solutions and video are in the course

Question 49 · 2 marks Q2128

Let 𝐴 be any 𝑛 × 𝑚 matrix, where 𝑚 > 𝑛. Which of the following statements is/are TRUE about the system of linear equations 𝐴𝑥 = 0 ?

  1. A.

    There exist at least 𝑚 − 𝑛 linearly independent solutions to this system

  2. B.

    There exist 𝑚 − 𝑛 linearly independent vectors such that every solution is a linear combination of these vectors

  3. C.

    There exists a non-zero solution in which at least 𝑚 − 𝑛 variables are 0

  4. D.

    There exists a solution in which at least 𝑛 variables are non-zero

Official answer key

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

Solutions and video are in the course

Question 50 · 2 marks Q2129

Consider the 5-state DFA 𝑀 accepting the language 𝐿(𝑀) ⊂ (0 + 1)∗ shown below. For any string 𝑤 ∈ (0 + 1)∗ let n0n_0(𝑤) be the number of 0 ′ 𝑠 in 𝑤 and n1n_1(𝑤) be the number of 1′𝑠 in 𝑤.

Which of the following statements is/are FALSE?

  1. A.

    States 2 and 4 are distinguishable in 𝑀

  2. B.

    States 3 and 4 are distinguishable in 𝑀

  3. C.

    States 2 and 5 are distinguishable in 𝑀

  4. D.

    Any string 𝑤 with n0n_0(𝑤) = n1n_1(𝑤) is in 𝐿(𝑀)

Official answer key

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

Solutions and video are in the course

Question 51 · 2 marks Q2130

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 𝑘. Which of the following statements is/are always TRUE?

  1. A.

    𝐺 contains a complete subgraph with 𝑘 vertices

  2. B.

    𝐺 contains an independent set of size at least 𝑛/ 𝑘

  3. C.

    𝐺 contains at least 𝑘(𝑘 − 1)/2 edges

  4. D.

    𝐺 contains a vertex of degree at least 𝑘

Official answer key

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

Solutions and video are in the course

Question 52 · 2 marks Q2131

Consider the operators ◊ and □ defined by 𝑎 ◊ 𝑏 = 𝑎 + 2𝑏, 𝑎□𝑏 = 𝑎𝑏, for positive integers. Which of the following statements is/are TRUE?

  1. A.

    Operator ◊ obeys the associative law

  2. B.

    Operator □ obeys the associative law

  3. C.

    Operator ◊ over the operator □ obeys the distributive law

  4. D.

    Operator □ over the operator ◊ obeys the distributive law

Official answer key

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

Solutions and video are in the course

Question 53 · 2 marks Q2132

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 Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?

  1. A.

    A read miss in WBC never evicts a dirty block

  2. B.

    A read miss in WTC never triggers a write back operation of a cache block to main memory

  3. C.

    A write hit in WBC can modify the value of the dirty bit of a cache block

  4. D.

    A write miss in WTC always writes the victim cache block to main memory before loading the missed block to the cache

Official answer key

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

Solutions and video are in the course

Question 54 · 2 marks Q2133

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 _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 4096

Solutions and video are in the course

Question 55 · 2 marks Q2134

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. The overhead for using an additional core is 10 ns when running on a multicore system. Assume that all cores in the multicore system run their share of the parallelized code for an equal amount of time.

The number of cores that minimize the execution time of the program is ________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 3

Solutions and video are in the course

Question 56 · 2 marks Q2135

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 cache and 8% miss rate on data cache. The miss penalty is 100 cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e., with NO data or instruction cache misses) is _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 3

Solutions and video are in the course

Question 57 · 2 marks Q2136

Consider the following code snippet using the fork() and wait() system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors.

                int x = 3;

                while(x > 0) {

                        fork();

                        printf("hello");

                        wait(NULL);

                        x--;

                }

The total number of times the printf statement is executed is _______

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 14 times

Solutions and video are in the course

Question 58 · 2 marks Q2137

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 IP address matches the prefix. The notation “/N” in a prefix indicates a subnet mask with the most significant N bits set to 1.

   Prefix                          Next hop router  
10.1.1.0/24                        R1  
10.1.1.128/25                    R2  
10.1.1.64/26                     R3  
10.1.1.192/26                    R4

This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205 . The number of packets forwarded via the next hop router R2 is _______

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 40 packets

Solutions and video are in the course

Question 59 · 2 marks Q2138

Let 𝐺 = (𝑉, Σ, 𝑆, 𝑃) be a context-free grammar in Chomsky Normal Form with Σ = {𝑎, 𝑏, 𝑐} and 𝑉 containing 10 variable symbols including the start symbol 𝑆. The string 𝑤 = 𝑎30𝑏30𝑐30 is derivable from 𝑆. The number of steps (application of rules) in the derivation 𝑆 →∗ 𝑤 is _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 179

Solutions and video are in the course

Question 60 · 2 marks Q2139

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 _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 60

Solutions and video are in the course

Question 61 · 2 marks Q2140

Consider the following two regular expressions over the alphabet {0,1}:

                    𝑟 = 0∗ + 1∗

                    𝑠 = 01∗ + 10∗

The total number of strings of length less than or equal to 5, which are neither in 𝑟 nor in 𝑠, is _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 44

Solutions and video are in the course

Question 62 · 2 marks Q1932

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 stored in the page frames 1, 3, 2, and 0, respectively. The physical address (in decimal format) corresponding to the virtual address 2500 (in decimal format) is _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 6596

Solutions and video are in the course

Question 63 · 2 marks Q2142

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 decimal places) that both balls drawn are red is _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 0.37 to 0.38

Solutions and video are in the course

Question 64 · 2 marks Q2143

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 select lines of M1, M2, and M3, respectively.

For an instance of inputs X1=1, X2=1, X3=0, and X4=0, the number of combinations of A, B, C that give the output Y=1 is _________

Official answer key

Official answer key (GATE Computer Science & IT 2024 GATE 2024 · CS · Set 1): 4

Solutions and video are in the course

Question 65 · 2 marks Q2144

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 link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is ________

Official answer key

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

Solutions and video are in the course

Question 1 · 1 mark Q2080

If ‘→’ denotes increasing order of intensity, then the meaning of the words [dry → arid → parched] is analogous to [diet → fast → ________ ]. Which one of the given options is appropriate to fill the blank?

  1. A.

    starve

  2. B.

    reject

  3. C.

    feast

  4. D.

    deny

Official answer key

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

Solutions and video are in the course

Question 2 · 1 mark Q2081

If two distinct non-zero real variables 𝑥 and 𝑦 are such that (𝑥 + 𝑦) is proportional to (𝑥 − 𝑦) then the value of xy\frac{x}{y}

  1. A.

    depends on 𝑥𝑦

  2. B.

    depends only on 𝑥 and not on 𝑦

  3. C.

    depends only on 𝑦 and not on 𝑥

  4. D.

    is a constant

Official answer key

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

Solutions and video are in the course

Question 3 · 1 mark Q2082

Consider the following sample of numbers:

     9, 18, 11, 14, 15, 17, 10, 69, 11, 13

The median of the sample is

  1. A.

    13.5

  2. B.

    14

  3. C.

    11

  4. D.

    18.7

Official answer key

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

Solutions and video are in the course

Question 4 · 1 mark Q2083

The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins is

  1. A.

    21%

  2. B.

    1427%14 \frac{2}{7}\%

  3. C.

    10%

  4. D.

    30%

Official answer key

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

Solutions and video are in the course

Question 5 · 1 mark Q2084

For positive non-zero real variables 𝑝 and 𝑞, if

log⁡(p2+q2)=log⁡p+log⁡q+2log⁡3\log(p^2 + q^2) = \log p + \log q + 2 \log 3

then, the value of p4+q4p2q2\frac{{p^4 + q^4}}{{p^2q^2}}  is

  1. A.

    79    

  2. B.

    81

  3. C.

    9

  4. D.

    83

Official answer key

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

Solutions and video are in the course

Question 6 · 2 marks Q2085

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, while he had a head ___(iii)___batting, he could only do so with a cool head ___(iv)___his shoulders.

  1. A.

    (i) down     (ii) down     (iii) on     (iv) for

  2. B.

    (i) on     (ii) down     (iii) for     (iv) on

  3. C.

    (i) down     (ii) out     (iii) for     (iv) on

  4. D.

    (i) on     (ii) out     (iii) on     (iv) for

Official answer key

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

Solutions and video are in the course

Question 7 · 2 marks Q2086

A rectangular paper sheet of dimensions 54 cm × 4 cm is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube whose surface area is equal to the area of the sheet is also taken.

Then, the ratio of the volume of the cylindrical tube to the volume of the cube is

  1. A.

    1/π

  2. B.

    2/π

  3. C.

    3/π

  4. D.

    4/π

Official answer key

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

Solutions and video are in the course

Question 8 · 2 marks Q2087

The pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person.

The typical energy density (kcal/g) of these macronutrients is given in the table.

Macronutrient

Energy density (kcal/g)

Carbohydrates

4

Proteins

4

Unsaturated fat

9

Saturated fat

9

Trans fat

9

The total fat (all three types), in grams, this person consumes is

  1. A.

    44.4

  2. B.

    77.8

  3. C.

    100

  4. D.

    3,600

Official answer key

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

Solutions and video are in the course

Question 9 · 2 marks Q2088

A rectangular paper of 20 cm × 8 cm is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter of the final folded sheet (in cm) is

  1. A.

    18    

  2. B.

    24

  3. C.

    20

  4. D.

    21

Official answer key

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

Solutions and video are in the course

Question 10 · 2 marks Q2089

The least number of squares to be added in the figure to make AB a line of symmetry is

  1. A.

    6

  2. B.

    4

  3. C.

    5

  4. D.

    7

Official answer key

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

Solutions and video are in the course