IAE Academy

PAPERS · GATE CS

GATE CSE 2024 Set 1 question paper with solutions

All 65 questions of the GATE 2024 Set 1 Computer Science and Information Technology paper, in order, with the official answer key from IISc Bengaluru.

Download the solved paper (PDF, 2.1 MB)
questions · 100 marks
65questions · 100 marks
official answer key
IISc Bengaluruofficial answer key
question types
29 MCQ · 20 MSQ · 16 NATquestion types

GATE CSE 2024 Set 1 answer key

Official answers to every question of GATE CSE 2024 Set 1
QuestionTypeMarksAnswer
Q.1MCQ1A
Q.2MCQ1D
Q.3MCQ1A
Q.4MCQ1C
Q.5MCQ1A
Q.6MCQ2C
Q.7MCQ2A
Q.8MCQ2C
Q.9MCQ2A
Q.10MCQ2A
Q.11MCQ1D
Q.12MCQ1B
Q.13MCQ1B
Q.14MCQ1B
Q.15MCQ1C
Q.16MCQ1C
Q.17MCQ1A
Q.18MCQ1C
Q.19MCQ1C
Q.20MCQ1D
Q.21MCQ1A
Q.22MSQ1A, C
Q.23MSQ1C, D
Q.24MSQ1D
Q.25MSQ1B, C
Q.26MSQ1A, D
Q.27MSQ1B, C
Q.28MSQ1A, C
Q.29MSQ1A, D
Q.30MSQ1A, B, C
Q.31MSQ1A, C
Q.32NAT12
Q.33NAT16
Q.34NAT116
Q.35NAT12
Q.36MCQ2B
Q.37MCQ2A
Q.38MCQ2A
Q.39MCQ2D
Q.40MCQ2A
Q.41MCQ2D
Q.42MCQ2A
Q.43MCQ2A
Q.44MSQ2B, C, D
Q.45MSQ2C
Q.46MSQ2B, C, D
Q.47MSQ2A, B
Q.48MSQ2B, D
Q.49MSQ2A
Q.50MSQ2B, C
Q.51MSQ2B, C
Q.52MSQ2B, D
Q.53MSQ2B, C
Q.54NAT24096
Q.55NAT23
Q.56NAT23.00
Q.57NAT214
Q.58NAT240
Q.59NAT2179
Q.60NAT260
Q.61NAT244
Q.62NAT26596
Q.63NAT20.370 to 0.380
Q.64NAT24
Q.65NAT26

General Aptitude Q.1 to Q.10

  1. Q.1MCQ · 1 mark

    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: A

  2. Q.2MCQ · 1 mark

    If two distinct non-zero real variables and are such that is proportional to then the value of

    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: D

  3. Q.3MCQ · 1 mark

    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: A

  4. Q.4MCQ · 1 mark

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

    1. (A)

      21%

    2. (B)

      14 2/7 %

    3. (C)

      10%

    4. (D)

      30%

    Official answer: C

  5. Q.5MCQ · 1 mark

    For positive non-zero real variables and , if

    then, the value of is

    1. (A)

      79

    2. (B)

      81

    3. (C)

      9

    4. (D)

      83

    Official answer: A

  6. Q.6MCQ · 2 marks

    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: C

  7. Q.7MCQ · 2 marks

    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: A

  8. Q.8MCQ · 2 marks

    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.

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

    GATE CSE 2024 Set 1 Q.8 as printed in the question paper, with its figureTap to open full size
    1. (A)

      44.4

    2. (B)

      77.8

    3. (C)

      100

    4. (D)

      3,600

    Official answer: C

  9. Q.9MCQ · 2 marks

    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: A

  10. Q.10MCQ · 2 marks

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

    GATE CSE 2024 Set 1 Q.10 as printed in the question paper, with its figureTap to open full size
    1. (A)

      6

    2. (B)

      4

    3. (C)

      5

    4. (D)

      7

    Official answer: A

Computer Science and Information Technology Q.11 to Q.65

  1. Q.11MCQ · 1 mark

    Let be a function such that , , where is the set of all real numbers. The set of all points where is NOT differentiable is

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: D

  2. Q.12MCQ · 1 mark

    The product of all eigenvalues of the matrix is

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: B

  3. Q.13MCQ · 1 mark

    Consider a system that uses 5 bits for representing signed integers in 2's complement format. In this system, two integers A and B are represented as A=01010 and B=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: B

  4. Q.14MCQ · 1 mark

    Consider a permutation sampled uniformly at random from the set of all permutations of for some . 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: B

  5. Q.15MCQ · 1 mark

    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: C

  6. Q.16MCQ · 1 mark

    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: C

  7. Q.17MCQ · 1 mark

    Given an integer array of size , we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass 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: A

  8. Q.18MCQ · 1 mark

    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: C

  9. Q.19MCQ · 1 mark

    Consider the following C program:

    #include <stdio.h>
    void fX();
    int main(){
        fX();
        return 0;}
    void fX(){
      char a;
      if((a=getchar()) != '\n')
          fX();
      if(a != '\n')
          putchar(a);}

    Assume 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?

    GATE CSE 2024 Set 1 Q.19 as printed in the question paper, with its figureTap to open full size
    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: C

  10. Q.20MCQ · 1 mark

    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?

    GATE CSE 2024 Set 1 Q.20 as printed in the question paper, with its figureTap to open full size
    1. (A)

      (i)

    2. (B)

      (ii)

    3. (C)

      (iii)

    4. (D)

      (iv)

    Official answer: D

  11. Q.21MCQ · 1 mark

    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: A

  12. Q.22MSQ · 1 mark

    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: A, C

  13. Q.23MSQ · 1 mark

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

    1. (A)

      if and only if

    2. (B)

      is not regular

    3. (C)

      is not regular

    4. (D)

      is regular

    Official answer: C, D

  14. Q.24MSQ · 1 mark

    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: D

  15. Q.25MSQ · 1 mark

    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: B, C

  16. Q.26MSQ · 1 mark

    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: A, D

  17. Q.27MSQ · 1 mark

    Let and be two events in a probability space with , , and . Which of the following statements is/are TRUE?

    1. (A)

      The two events and are independent

    2. (B)

    3. (C)

      , where is the complement of the event

    4. (D)

      , where and are the complements of the events and , respectively

    Official answer: B, C

  18. Q.28MSQ · 1 mark

    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?

    GATE CSE 2024 Set 1 Q.28 as printed in the question paper, with its figureTap to open full size
    1. (A)

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

    2. (B)

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

    3. (C)

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

    4. (D)

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

    Official answer: A, C

  19. Q.29MSQ · 1 mark

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

    1. (A)

      The sequence number is chosen randomly by P

    2. (B)

      The sequence number is always 0 for a new connection

    3. (C)

      The acknowledgement number is equal to

    4. (D)

      The acknowledgement number is equal to

    Official answer: A, D

  20. Q.30MSQ · 1 mark

    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: A, B, C

  21. Q.31MSQ · 1 mark

    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: A, C

  22. Q.32NAT · 1 mark

    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: 2

  23. Q.33NAT · 1 mark

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

    OperatorPrecedenceAssociativity
    +HighestLeft
    −HighRight
    *MediumRight
    /LowRight

    The value of the expression as per the above rules is ____

    GATE CSE 2024 Set 1 Q.33 as printed in the question paper, with its figureTap to open full size

    Official answer: 6

  24. Q.34NAT · 1 mark

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

    Official answer: 16

  25. Q.35NAT · 1 mark

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

    The total number of tuples obtained by evaluating the following expression

    is _________

    GATE CSE 2024 Set 1 Q.35 as printed in the question paper, with its figureTap to open full size

    Official answer: 2

  26. Q.36MCQ · 2 marks

    Consider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size bytes to R via this path by splitting the file into chunks of bytes 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 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 .
    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: B

  27. Q.37MCQ · 2 marks

    Consider the following syntax-directed definition (SDD).

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

    GATE CSE 2024 Set 1 Q.37 as printed in the question paper, with its figureTap to open full size
    1. (A)

      45

    2. (B)

      50

    3. (C)

      55

    4. (D)

      65

    Official answer: A

  28. Q.38MCQ · 2 marks

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

    The set of terminals is . The FIRST and FOLLOW sets of the different non-terminals are as follows.

    , ,

    is the set of the three symbols , and the end marker $, and .

    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: A

  29. Q.39MCQ · 2 marks

    Consider the following pseudo-code.

    L1:  t1 = -1
    L2:  t2 = 0
    L3:  t3 = 0
    L4:  t4 = 4 * t3
    L5:  t5 = 4 * t2
    L6:  t6 = t5 * M
    L7:  t7 = t4 + t6
    L8:  t8 = a[t7]
    L9:  if t8 <= max goto L11
    L10: t1 = t8
    L11: t3 = t3 + 1
    L12: if t3 < M goto L4
    L13: t2 = t2 + 1
    L14: if t2 < N goto L3
    L15: max = t1

    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: D

  30. Q.40MCQ · 2 marks

    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:

    a = a + 1;
    b = b + 1;

    T2:

    b = 2 * b;
    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: A

  31. Q.41MCQ · 2 marks

    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: D

  32. Q.42MCQ · 2 marks

    Consider the following recurrence relation:

    Which one of the following options is CORRECT?

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: A

  33. Q.43MCQ · 2 marks

    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: A

  34. Q.44MSQ · 2 marks

    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: B, C, D

  35. Q.45MSQ · 2 marks

    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: C

  36. Q.46MSQ · 2 marks

    Consider the following read-write schedule over three transactions , , and , where the subscripts in the schedule indicate transaction IDs:

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

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: B, C, D

  37. Q.47MSQ · 2 marks

    Consider a Boolean expression given by .

    Which of the following statements is/are CORRECT?

    1. (A)

    2. (B)

    3. (C)

      is independent of input

    4. (D)

      is independent of input

    Official answer: A, B

  38. Q.48MSQ · 2 marks

    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

    2. (B)

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

    3. (C)

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

    4. (D)

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

    Official answer: B, D

  39. Q.49MSQ · 2 marks

    Let be any matrix, where . Which of the following statements is/are TRUE about the system of linear equations ?

    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

    4. (D)

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

    Official answer: A

  40. Q.50MSQ · 2 marks

    Consider the 5-state DFA accepting the language shown below. For any string let be the number of 0's in and be the number of 1's in . Which of the following statements is/are FALSE?

    GATE CSE 2024 Set 1 Q.50 as printed in the question paper, with its figureTap to open full size
    1. (A)

      States 2 and 4 are distinguishable in M

    2. (B)

      States 3 and 4 are distinguishable in M

    3. (C)

      States 2 and 5 are distinguishable in M

    4. (D)

      Any string w with n_0(w) = n_1(w) is in L(M)

    Official answer: B, C

  41. Q.51MSQ · 2 marks

    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 edges

    4. (D)

      contains a vertex of degree at least

    Official answer: B, C

  42. Q.52MSQ · 2 marks

    Consider the operators ◊ and □ defined by , , 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: B, D

  43. Q.53MSQ · 2 marks

    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 into the cache

    Official answer: B, C

  44. Q.54NAT · 2 marks

    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: 4096

  45. Q.55NAT · 2 marks

    Official answer: 3

  46. Q.56NAT · 2 marks

    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: 3.00

  47. Q.57NAT · 2 marks

    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: 14

  48. Q.58NAT · 2 marks

    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.

    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 ______

    GATE CSE 2024 Set 1 Q.58 as printed in the question paper, with its figureTap to open full size

    Official answer: 40

  49. Q.59NAT · 2 marks

    Let be a context-free grammar in Chomsky Normal Form with and containing 10 variable symbols including the start symbol . The string is derivable from . The number of steps (application of rules) in the derivation is ______.

    Official answer: 179

  50. Q.60NAT · 2 marks

    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 _____ (answer in integer)

    Official answer: 60

  51. Q.61NAT · 2 marks

    Consider the following two regular expressions over the alphabet :

    The total number of strings of length less than or equal to 5, which are neither in nor in , is ______.

    Official answer: 44

  52. Q.62NAT · 2 marks

    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: 6596

  53. Q.63NAT · 2 marks

    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: 0.370 to 0.380

  54. Q.64NAT · 2 marks

    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 ______.

    GATE CSE 2024 Set 1 Q.64 as printed in the question paper, with its figureTap to open full size

    Official answer: 4

  55. Q.65NAT · 2 marks

    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: 6