IAE Academy

PAPERS · GATE CS

GATE CSE 2026 Set 2 question paper with solutions

All 65 questions of the GATE 2026 Set 2 Computer Science and Information Technology paper, in order, with the official answer key from IIT Guwahati.

Download the solved paper (PDF, 2.3 MB)
questions · 100 marks
65questions · 100 marks
official answer key
IIT Guwahatiofficial answer key
question types
35 MCQ · 11 MSQ · 19 NATquestion types

GATE CSE 2026 Set 2 answer key

Official answers to every question of GATE CSE 2026 Set 2
QuestionTypeMarksAnswer
Q.1MCQ1A
Q.2MCQ1C
Q.3MCQ1A
Q.4MCQ1A
Q.5MCQ1C
Q.6MCQ2A
Q.7MCQ2A
Q.8MCQ2A
Q.9MCQ2B
Q.10MCQ2C
Q.11MCQ1A
Q.12MCQ1A
Q.13MCQ1D
Q.14MCQ1B
Q.15MCQ1C
Q.16MCQ1B
Q.17MCQ1C
Q.18MCQ1C
Q.19MCQ1A
Q.20MCQ1A
Q.21MCQ1B
Q.22MCQ1C
Q.23MCQ1B
Q.24MCQ1A
Q.25MSQ1A, B
Q.26MSQ1A, B, C
Q.27MSQ1A, C
Q.28MSQ1B, D
Q.29MSQ1B, C
Q.30NAT13
Q.31NAT124
Q.32NAT13
Q.33NAT14094
Q.34NAT1-60.25
Q.35NAT113
Q.36MCQ2C
Q.37MCQ2A
Q.38MCQ2A
Q.39MCQ2A
Q.40MCQ2B
Q.41MCQ2D
Q.42MCQ2D
Q.43MCQ2D
Q.44MCQ2B
Q.45MCQ2A
Q.46MCQ2A
Q.47MSQ2C, D
Q.48MSQ2A, C, D
Q.49MSQ2A, C
Q.50MSQ2A, B
Q.51MSQ2A, B, C
Q.52MSQ2A, B
Q.53NAT216417
Q.54NAT21536
Q.55NAT23
Q.56NAT2128
Q.57NAT22.30 to 2.40
Q.58NAT24
Q.59NAT26
Q.60NAT29
Q.61NAT21
Q.62NAT248
Q.63NAT20.5
Q.64NAT240
Q.65NAT230

General Aptitude Q.1 to Q.10

  1. Q.1MCQ · 1 mark

    Expedite, Hasten, Hurry, ______

    Fill the blank by choosing a word with a meaning similar to that of the words given above.

    1. (A)

      Accelerate

    2. (B)

      Retard

    3. (C)

      Provide

    4. (D)

      Disable

    Official answer: A

  2. Q.2MCQ · 1 mark

    A black square PQRS has been cut into two parts. One part of it is shown in Panel I. Which one of the shapes in Panel II is the other part?

    GATE CSE 2026 Set 2 Q.2 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: C

  3. Q.3MCQ · 1 mark

    A day can only be cloudy or sunny. The probability of a day being cloudy is 0.5, independent of the condition on other days. What is the probability that in any given four days, there will be three cloudy days and one sunny day?

    1. (A)

      1/4

    2. (B)

      3/4

    3. (C)

      2/3

    4. (D)

      3/8

    Official answer: A

  4. Q.4MCQ · 1 mark

    The values of Stock A and Stock B on a particular day are Rs. 50 and Rs. 80, respectively. An investor invests Rs. 100 in Stock A and Rs. 80 in Stock B. He sells all the stocks the next day when the value of Stock A is Rs. 55 and Stock B is Rs. 70. The profit made by the investor is Rs. ______

    1. (A)

      0

    2. (B)

      5

    3. (C)

      10

    4. (D)

      20

    Official answer: A

  5. Q.5MCQ · 1 mark

    ‘When it is raining, peacocks dance.’

    Based only on this sentence, which one of the following options is necessarily true?

    1. (A)

      Peacocks dance only when it is raining.

    2. (B)

      When peacocks dance, it is raining.

    3. (C)

      When peacocks are not dancing, it is not raining.

    4. (D)

      When it is not raining, peacocks do not dance.

    Official answer: C

  6. Q.6MCQ · 2 marks

    Water : P :: Food : Q

    Choose the P and Q combination from the options below to form a meaningful analogy.

    1. (A)

      P = Thirst; Q = Hunger

    2. (B)

      P = Drink; Q = Hunger

    3. (C)

      P = Thirst; Q = Satiated

    4. (D)

      P = Wet; Q = Critic

    Official answer: A

  7. Q.7MCQ · 2 marks

    Two tiles are missing in Panel I. Which one of the options in Panel II is the appropriate choice for the missing tiles?

    GATE CSE 2026 Set 2 Q.7 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: A

  8. Q.8MCQ · 2 marks

    Figures (i) and (ii) represent intercity highway systems. The black dots represent cities and the line segments between them represent intercity highways.
    A salesperson needs to make a trip. She needs to start from a city, visit each of the remaining cities exactly once, and finally return to the same city from which she started.
    Which one of the following options is then true?

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

      Such a trip is possible for (i), but not for (ii).

    2. (B)

      Such a trip is possible for (ii), but not for (i).

    3. (C)

      Such a trip is possible for both (i) and (ii).

    4. (D)

      Such a trip is possible neither for (i) nor for (ii).

    Official answer: A

  9. Q.9MCQ · 2 marks

    The figure in Panel I below is a grid of cells with four rows and four columns. The numbers on the top and on the left represent the number of cells that are to be shaded in that column and row, respectively. Which one of the options shown in Panel II below represents the grid shaded correctly?

    GATE CSE 2026 Set 2 Q.9 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: B

  10. Q.10MCQ · 2 marks

    An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice in succession and the number on the top face is recorded each time. The probability that the sum of the two recorded numbers is a prime number is ________

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: C

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

  1. Q.11MCQ · 1 mark

    For two different persons and , the predicate denotes that knows . Consider the following statement.

    There is a person who does not know anyone else, but that person is known by everyone else.

    Which one of the following expressions represents the above statement?

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: A

  2. Q.12MCQ · 1 mark

    The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal.

    TS
    I: InorderL: left subtree, node, right subtree
    II: PreorderM: node, left subtree, right subtree
    III: PostorderN: left subtree, right subtree, node

    Which one of the following is the correct match from T to S ?

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

      I – L, II – M, III – N

    2. (B)

      I – M, II – L, III – N

    3. (C)

      I – N, II – M, III – L

    4. (D)

      I – L, II – N, III – M

    Official answer: A

  3. Q.13MCQ · 1 mark

    Which one of the following statements is equivalent to the following assertion?

    Turing machine decides the language

    1. (A)

      Turing machine halts on all input strings in

    2. (B)

      Turing machine accepts all input strings in

    3. (C)

      Turing machine rejects all input strings in

    4. (D)

      Turing machine accepts all input strings in and rejects all input strings in

    Official answer: D

  4. Q.14MCQ · 1 mark

    The probability density function of a random variable which takes real values is

    Which one of the following statements is correct about the random variable ?

    1. (A)

      is an exponential random variable

    2. (B)

      is a normal random variable

    3. (C)

      is a Poisson random variable

    4. (D)

      is a uniform random variable

    Official answer: B

  5. Q.15MCQ · 1 mark

    In the context of DBMS, consider the two sets T and S given below.

    Which one of the following is the correct match from T to S?

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

      I – L, II – M, III – N

    2. (B)

      I – M, II – L, III – N

    3. (C)

      I – N, II – M, III – L

    4. (D)

      I – N, II – L, III – M

    Official answer: C

  6. Q.16MCQ · 1 mark

    Which one of the following options is not a property of Boolean Algebra?

    Note: is OR operation, is AND operation, and is NOT operation

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: B

  7. Q.17MCQ · 1 mark

    In C runtime environment, which one of the following is stored in heap?

    1. (A)

      A static variable declared inside a function

    2. (B)

      An array of integers declared inside a function

    3. (C)

      A dynamically allocated array of integers created using malloc() function call

    4. (D)

      Return address of a function

    Official answer: C

  8. Q.18MCQ · 1 mark

    Consider the following two statements about interrupt handling mechanisms in a CPU.

    S1: In non-vectored interrupt mechanism, it usually takes more time to start the Interrupt Service Routine (ISR) when compared to that in a vectored interrupt mechanism.

    S2: In daisy-chain interrupt mechanism, the CPU polls all the input devices individually to determine the source of the interrupt.

    Which one of the following options is correct with respect to S1 and S2 ?

    1. (A)

      Both S1 and S2 are true

    2. (B)

      Both S1 and S2 are false

    3. (C)

      S1 is true and S2 is false

    4. (D)

      S1 is false and S2 is true

    Official answer: C

  9. Q.19MCQ · 1 mark

    Consider the following three ANSI-C programs, P1, P2, and P3.

    P1

    #include <stdio.h>
    int a=5;
    int main(){
      int a=7;
      return(0);
    }

    P2

    #include <stdio.h>
    int main(){
      int a=5;
      int a=7;
      return(0);
    }

    P3

    #include <stdio.h>
    int main(){
      int a=5;
      float a=7;
      return(0);
    }

    Which one of the following statements is true?

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

      Only P1 will compile without any error

    2. (B)

      Only P2 will compile without any error

    3. (C)

      Only P3 will compile without any error

    4. (D)

      All three programs P1, P2, and P3 will compile without any error

    Official answer: A

  10. Q.20MCQ · 1 mark

    Consider concurrent execution of two transactions and in a DBMS, both of which access a data object . For these two transactions to not conflict on , which one of the following statements must be true?

    1. (A)

      Both and only read

    2. (B)

      reads and writes

    3. (C)

      writes and reads

    4. (D)

      Both and write

    Official answer: A

  11. Q.21MCQ · 1 mark

    Consider a file of size 4 million bytes being transferred between two hosts connected via a path consisting of three consecutive links of bandwidth 2 Mbps, 500 kbps, and 1 Mbps, respectively. All processing delays and propagation delays are negligible. Assume that there is no other background traffic over the path and no other additional overhead to transfer the file.

    Which one of the following is the total time (in seconds) to transfer the file?

    Note: 1M=10^6, 1k=10^3

    1. (A)

      731

    2. (B)

      64

    3. (C)

      8

    4. (D)

      16

    Official answer: B

  12. Q.22MCQ · 1 mark

    Which one of the following protocols may need to broadcast some of its messages?

    1. (A)

      SMTP

    2. (B)

      FTP

    3. (C)

      DHCP

    4. (D)

      HTTP

    Official answer: C

  13. Q.23MCQ · 1 mark

    Which one of the following CPU scheduling algorithms cannot be preemptive?

    1. (A)

      Shortest Remaining Time First (SRTF) Scheduling

    2. (B)

      First Come First Serve (FCFS) Scheduling

    3. (C)

      Round Robin Scheduling

    4. (D)

      Priority Scheduling

    Official answer: B

  14. Q.24MCQ · 1 mark

    Consider the following functions, where is a positive integer.

    Which one of the following options lists the functions in increasing order of asymptotic growth rate?

    Note: Assume the base of log to be 2.

    1. (A)

      , , ,

    2. (B)

      , , ,

    3. (C)

      , , ,

    4. (D)

      , , ,

    Official answer: A

  15. Q.25MSQ · 1 mark

    Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity ?

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: A, B

  16. Q.26MSQ · 1 mark

    Let be a binary relation on the set , where if the product of and is square of an integer. Which of the following properties is/are satisfied by ?

    1. (A)

      Reflexive

    2. (B)

      Symmetric

    3. (C)

      Transitive

    4. (D)

      Antisymmetric

    Official answer: A, B, C

  17. Q.27MSQ · 1 mark

    For a real number , let . Which of the following statements is/are true?

    1. (A)

      The value of is independent of the value of

    2. (B)

      The value of can vary with the value of

    3. (C)

      There exists such that is a positive real number

    4. (D)

      There exists such that is a negative real number

    Official answer: A, C

  18. Q.28MSQ · 1 mark

    In a system, numbers are represented using 4-bit two's complement form. Consider four numbers N1 = 1011, N2 = 1101, N3 = 1010 and N4 = 1001 in the system. Which of the following operations will result in arithmetic overflow?

    1. (A)

      N1 + N2

    2. (B)

      N2 + N3

    3. (C)

      N3 - N4

    4. (D)

      N1 + N4

    Official answer: B, D

  19. Q.29MSQ · 1 mark

    Which of the following grammars is/are ambiguous?

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: B, C

  20. Q.30NAT · 1 mark

    The keys 5, 28, 19, 15, 26, 33, 12, 17, 10 are inserted into a hash table using the hash function . The collisions are resolved by chaining. After all the keys are inserted, the length of the longest chain is ________. (answer in integer)

    Official answer: 3

  21. Q.31NAT · 1 mark

    Consider the system of linear equations given below.


    Suppose the values of and are chosen such that the system of linear equations produce multiple solutions. Then the product of and is ______. (answer in integer)

    Official answer: 24

  22. Q.32NAT · 1 mark

    Consider an array . Suppose the merge sort algorithm is executed on array to sort it in increasing order. The merge sort algorithm will carry out a total of 7 merge operations.

    A merge operation on sorted left array and sorted right array is said to be void if the output of the merge operation is the elements of array followed by the elements of array .

    The number of void merge operations among these 7 merge operations is __________. (answer in integer)

    Official answer: 3

  23. Q.33NAT · 1 mark

    If an IP network uses a subnet mask of 255.255.240.0, the maximum number of IP addresses that can be assigned to network interfaces is ______. (answer in integer)

    Official answer: 4094

  24. Q.34NAT · 1 mark

    The 32-bit IEEE 754 single precision representation of a number is 0xC2710000. The number in decimal representation is ________. (rounded off to two decimal places)

    Official answer: -60.25

  25. Q.35NAT · 1 mark

    A lexical analyzer uses the following token definitions

    For the string given below,

    x1 23mm 78 y 7z zz5 14A 8H AaYcD

    the number of tokens (excluding ) that will be produced by the lexical analyzer is ______. (answer in integer)

    Official answer: 13

  26. Q.36MCQ · 2 marks

    Consider a complete graph with vertices (). Note that multiple spanning trees can be constructed over . Each of these spanning trees is represented as a set of edges. The Jaccard coefficient between any two sets is defined as the ratio of the size of the intersection of the two sets to the size of the union of the two sets.

    Which one of the following options gives the lowest possible value for the Jaccard coefficient between any two spanning trees of ?

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: C

  27. Q.37MCQ · 2 marks

    Let be a weighted directed acyclic graph with edges and vertices. Given and a source vertex in , which one of the following options gives the worst case time complexity of the fastest algorithm to find the lengths of shortest paths from to all vertices that are reachable from in ?

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: A

  28. Q.38MCQ · 2 marks

    Consider an array of integers of size . The indices of run from to . An algorithm is to be designed to check whether satisfies the condition given below.

    Which one of the following gives the worst case time complexity of the fastest algorithm that can be designed for the problem?

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: A

  29. Q.39MCQ · 2 marks

    Consider a table , where the elements , , represent the cost of the optimal solutions of different subproblems of a problem that is being solved using a dynamic programming algorithm. The recursive formulation to compute the table entries is as follows:


    Consider the following two algorithms to compute entries of . Assume that for both the algorithms, for all , has been initialized to 1.

    Algorithm :

    For i = 1, 2, ..., n
        For j = 1, 2, ..., n
            T[i][j] = 2T[i-1][j] + 3T[i][j-1]

    Algorithm :

    For s = 2, 3, ..., 2n
        For i = 1, 2, ..., n
            For j = 1, 2, ..., n
                If (i + j == s)
                    T[i][j] = 2T[i-1][j] + 3T[i][j-1]

    Algorithm , is said to be correct if and only if it calculates the correct values of , for all , (as per the recursive formulation) at the end of the execution of the algorithm .

    Which one of the following statements is true?

    1. (A)

      Both algorithms and are correct

    2. (B)

      Algorithm is correct, but algorithm is incorrect

    3. (C)

      Algorithm is correct, but algorithm is incorrect

    4. (D)

      Both algorithms and are incorrect

    Official answer: A

  30. Q.40MCQ · 2 marks

    Consider the following 4-variable Boolean function

    Consider as MSB, as LSB. Which one of the following options represents the minimal sum of products form for the above function?

    Note: is OR operation, is AND operation, is NOT operation

    1. (A)

    2. (B)

    3. (C)

    4. (D)

    Official answer: B

  31. Q.41MCQ · 2 marks

    Consider the canonical parsing of the grammar below using terminals and non-terminals with as the start symbol.




    Which one of the following options gives the number of shift-reduce conflicts that will occur in the ACTION table?

    1. (A)

      2

    2. (B)

      3

    3. (C)

      4

    4. (D)

      5

    Official answer: D

  32. Q.42MCQ · 2 marks

    In the context of schema normalization in relational DBMS, consider a set F of functional dependencies. The set of all functional dependencies implied by F is called the closure of F. To compute the closure of F, Armstrong's Axioms can be applied. Consider X, Y, and Z as sets of attributes over a relational schema. The three rules of Armstrong's Axioms are described as follows.

    Reflexivity: If Y ⊆ X, then X → Y
    Augmentation: If X → Y, then XZ → YZ for any Z
    Transitivity: If X → Y and Y → Z, then X → Z

    The additional rule of Union is defined as follows.
    Union: If X → Y and X → Z, then X → YZ

    It can be proved that the additional rule of Union is also implied by the three rules of Armstrong's Axioms. Listed below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof?

    1. (A)

      Reflexivity, Augmentation, and Transitivity

    2. (B)

      Reflexivity and Augmentation

    3. (C)

      Transitivity

    4. (D)

      Augmentation and Transitivity

    Official answer: D

  33. Q.43MCQ · 2 marks

    Consider the transmission of data bits 110001011 over a link that uses Cyclic Redundancy Check (CRC) code for error detection. If the generator bit pattern is given to be 1001, which one of the following options shows the remainder bit pattern appended to the data bits before transmission?

    1. (A)

      011

    2. (B)

      101

    3. (C)

      000

    4. (D)

      100

    Official answer: D

  34. Q.44MCQ · 2 marks

    Consider a processor that has 16 general purpose registers and it uses 2-byte instruction format for all its instructions. Variable-sized opcodes are permitted. There are three different types of instructions; M-type, R-type, and C-type. Each M-type instruction has 2 register operands and a 6-bit immediate operand. Each R-type instruction has 3 register operands. Each C-type instruction has a register operand and a 6-bit offset value. If there are 2 unique M-type opcodes and 7 unique R-type opcodes, which one of the following options gives the maximum number of unique opcodes possible for C-type instructions?

    1. (A)

      8

    2. (B)

      4

    3. (C)

      64

    4. (D)

      16

    Official answer: B

  35. Q.45MCQ · 2 marks

    Consider the control flow graph given below.

    Which one of the following options is the set of live variables at the exit point of each basic block?

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

      B1:{a, b, c, e, f}, B2:{d, e}, B3:{b, c, e, f}, B4:∅

    2. (B)

      B1:∅, B2:{d, e}, B3:{a, c, f}, B4:∅

    3. (C)

      B1:{a, b, c, e, f}, B2:{d, e}, B3:{c, e, f}, B4:∅

    4. (D)

      B1:∅, B2:{d, e, f}, B3:{a, b, c, e, f}, B4:∅

    Official answer: A

  36. Q.46MCQ · 2 marks

    An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

    S1: A hash index must be a dense index

    S2: A tree index can be a sparse index

    Which one of the following options is correct?

    1. (A)

      Both S1 and S2 are true

    2. (B)

      Both S1 and S2 are false

    3. (C)

      S1 is true and S2 is false

    4. (D)

      S1 is false and S2 is true

    Official answer: A

  37. Q.47MSQ · 2 marks

    Consider the following two finite automata and .

    Which of the following statements is/are true?

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

    2. (B)

      is a proper subset of

    3. (C)

    4. (D)

      consists of all strings in whose length is divisible by 3

    Official answer: C, D

  38. Q.48MSQ · 2 marks

    Let and let .

    Which of the following constraints ensure(s) that the language is context-free?

    1. (A)

    2. (B)

      and

    3. (C)

      and

    4. (D)

    Official answer: A, C, D

  39. Q.49MSQ · 2 marks

    Consider a binary search tree (BST) with leaf nodes (). Given any node , the key present in the node is denoted as . All the keys present in the given BST are distinct. The keys belong to the set of real numbers.

    For a node , let denote the node that is its inorder successor. If a node does not have an inorder successor, then is . As there are no duplicates, if is not , then .

    Corresponding to every leaf node that has a non-NULL , a new key with the following property is to be inserted into the BST.

    Let represent the list of all such new keys to be inserted into the BST.

    Which of the following statements is/are true?

    1. (A)

      cannot have any duplicates

    2. (B)

      will have at least one element

    3. (C)

      After inserting all keys from , the height of the BST can increase at most by one

    4. (D)

      Number of nodes in the BST will double after inserting all keys from

    Official answer: A, C

  40. Q.50MSQ · 2 marks

    Consider a stack S and a queue Q. Both of them are initially empty and have the capacity to store ten elements each. The elements 1, 2, 3, 4, and 5 arrive one by one, in that order. When an element arrives, it is assigned either to S (pushed on S) or to Q (enqueued to Q). Once all the five elements are stored, the output is generated in two steps. First, stack S is emptied by popping all elements. Then queue Q is emptied by dequeueing all elements. The output obtained by following this process is 4 3 1 2 5.

    Given the output, the objective is to predict whether an element was assigned to S or Q.

    Which of the following options is/are possible valid assignment(s) of the elements?

    Note: In the options, the notation xS denotes that element x was assigned to S and yQ denotes that element y was assigned to Q.

    1. (A)

      1S, 2Q, 3S, 4S, 5Q

    2. (B)

      1Q, 2Q, 3S, 4S, 5Q

    3. (C)

      1Q, 2Q, 3Q, 4S, 5S

    4. (D)

      1S, 2S, 3S, 4Q, 5Q

    Official answer: A, B

  41. Q.51MSQ · 2 marks

    Consider three processes P1, P2, and P3 running identical code, as shown in the pseudocode below. A and B are two binary semaphores initialized to 1 and 0, respectively. X is a shared variable initialized to 0. Each line in the pseudocode is executed atomically.

    Pseudocode of P1, P2, and P3

    Wait(A);
    Print(*);
    X = X+1;
    If (X == 2)
       {
          Print($);
          Signal(B);
       }
    Signal(A);
    Wait(B);
    Print(#);
    Signal(B);

    Assume that any of the three processes can start to execute first and context switching can happen between these processes at any arbitrary time and in any arbitrary order.

    Which of the following patterns is/are possible to be generated as an outcome of the execution of these three processes?

    1. (A)

      **$*###

    2. (B)

      **$#*##

    3. (C)

      **$##*#

    4. (D)

      ***$###

    Official answer: A, B, C

  42. Q.52MSQ · 2 marks

    Consider a system with a processor and a 4 KB direct mapped cache with block size of 16 bytes. The system has a 16 MB physical memory. Four words P, Q, R, and S are accessed by the processor in the same order 10 times. That is, there are a total of 40 memory references in the sequence P, Q, R, S, P, Q, R, S, …

    Assume that the cache memory is initially empty. The physical addresses of the words are given below (1 word = 1 byte).

    P: 0x845B32, Q: 0x845B26, R: 0x845B36, S: 0x846B32

    Which of the following statements is/are true?

    Note: 1K= and 1M=

    1. (A)

      Every access to P results in a cache miss

    2. (B)

      Every access to R results in a cache hit

    3. (C)

      Every access to Q results in a cache miss

    4. (D)

      Except the first access to S, all subsequent accesses to S result in cache hits

    Official answer: A, B

  43. Q.53NAT · 2 marks

    To keep track of free blocks in a file system, one of the two approaches is generally used – using bitmaps (bit vectors) or using linked lists. Consider that the linked list approach is used to keep track of free blocks in a file system. Assume that the disk size is 16 GB, block size is 2 KB, and block numbers used are 32-bit long. A single pointer of size 4 bytes is used in each block of the list to point to the next block of the list. The number of blocks required to hold the free disk block numbers is ____________. (answer in integer)
    Note: 1K=2^10 and 1G=2^30

    Official answer: 16417

  44. Q.54NAT · 2 marks

    A system has a Translation Lookaside Buffer (TLB) that has a reach of 1 MB. TLB reach is defined as the total amount of physical memory that can be accessed through the TLB entries. The paging system uses pages of size 4 KB. The virtual address space is 64 GB and physical address space is 1 GB. If each TLB entry stores a 4-bit process id, page number, frame number, and a 2-bit control field, then the size of the TLB (in bytes) is ___________. (answer in integer)

    Note: 1K=2^10, 1M=2^20, 1G=2^30

    Official answer: 1536

  45. Q.55NAT · 2 marks

    Consider contiguous allocation of physical memory to processes using variable partitioning scheme. Suppose there are 8 holes in the memory of sizes 20 KB, 4 KB, 25 KB, 18 KB, 7 KB, 9 KB, 15 KB, and 12 KB. Assume that no two holes are adjacent. Two processes P1 of size 16 KB and P2 of size 9 KB arrive in that order, and they are allocated memory using the best-fit technique. After allocating space to P1 and P2, the number of holes of size less than 8 KB is ____________. (answer in integer)

    Note: 1K=2^10

    Official answer: 3

  46. Q.56NAT · 2 marks

    Consider a system with 1 MB physical memory and a word length of 1 byte. The system uses a direct mapped cache, with block numbers starting from 0. The word with physical address 0xA2C28 is mapped to the cache block number . The maximum possible size of the cache (in KB) for this configuration is ____________. (answer in integer)

    Note: and .

    Official answer: 128

  47. Q.57NAT · 2 marks

    A non-pipelined instruction execution unit that operates at 1.6 GHz clock takes an average of 5 clock cycles to complete the execution of an instruction. To improve the performance, the system was pipelined with a goal of achieving an average throughput of one instruction per clock cycle. However, it could operate only at 1.2 GHz due to pipeline overheads. While executing a program in the pipelined design, 30% of instructions encountered a stall of 2 cycles due to pipeline hazards. The speed-up obtained by the pipelined design over the non-pipelined one for this program is ____________. (rounded off to two decimal places)

    Note: 1G=

    Official answer: 2.30 to 2.40

  48. Q.58NAT · 2 marks

    Consider a new TCP connection between a sender and a receiver. The receiver advertised window is constant at 48 KB, the maximum segment size (MSS) is 2 KB, and the slow start threshold for TCP congestion control is 16 KB. Assume that there are no timeouts or duplicate acknowledgements. The number of rounds of transmission required for the congestion control algorithm of the TCP connection to reach the congestion avoidance phase is ________. (answer in integer)

    Note: 1K=2^10

    Official answer: 4

  49. Q.59NAT · 2 marks

    Consider the digital circuit shown below with two input lines A and B, two select lines S0 and S1, and an output line Y. The blocks Q and M represent active high 2:4 decoder and 4-to-1 multiplexer, respectively. Out of 16 possible input combinations, the number of combinations that produce Y=1 is ____. (answer in integer)

    Note: One input combination is an instance of [A B S1 S0].

    GATE CSE 2026 Set 2 Q.59 as printed in the question paper, with its figureTap to open full size

    Official answer: 6

  50. Q.60NAT · 2 marks

    Consider the following ANSI-C program.

    #include <stdio.h>
    
    int main(){
    	int *ptr, a, b, c;
    	a=5; b=11; c=20;
    	ptr=&a; *ptr=c; ptr=&c;
    	a=*(&b); c=*ptr-a;
    	printf("%d",c);
    	return(0);
    }

    The output of this program is ____________. (answer in integer)

    Note: Assume that the program compiles and runs successfully.

    Official answer: 9

  51. Q.61NAT · 2 marks

    Consider the following ANSI-C function.

    int func(int start, int end){
            int length=end+1-start;
            if((length<1)||(start<0)||(end<0)){ return(0); }
            if(length%3==0){
                    return(func(start+1, end));
            } else if(length%3==1){
                    return(1+func(start, end-1));
            } else {
                    return(func(start+2, end));
            }
    }

    The maximum possible value that can be returned from this function is ______. (answer in integer)

    Note: Ignore syntax errors (if any) in the function.

    Official answer: 1

  52. Q.62NAT · 2 marks

    The determinant of a matrix is 3. The value of the determinant of is ____________. (answer in integer)

    Official answer: 48

  53. Q.63NAT · 2 marks

    Suppose an unbiased coin is tossed 6 times. Each coin toss is independent of all previous coin tosses. Let be the event that among the second, fourth, and sixth coin tosses, there are at least two heads. Let be the event that among the first, second, third, and fifth coin tosses, there are equal number of heads and tails.

    The conditional probability is equal to ____________. (rounded off to one decimal place)

    Official answer: 0.5

  54. Q.64NAT · 2 marks

    Consider a function defined as follows.

    For a real number , if the second digit after the decimal point in is one of the four digits 2, 3, 6 and 7. Otherwise, is equal to 0.

    The number of points in at which is discontinuous is ___________. (answer in integer)

    Official answer: 40

  55. Q.65NAT · 2 marks

    It is necessary to design a link-layer protocol between two hosts that are directly connected over a lossless link of length 3000 kilometers. Assume that the link bandwidth is bits per second and that the propagation delay in the link is 5 nanoseconds per meter. Every transmitted data byte is assigned a unique sequence number.

    Let be the minimum number of bits needed for the sequence number field in the protocol header such that

    i. the sequence numbers do not wrap around before 60 seconds, and
    ii. the maximum utilization of the link is achieved.

    The value of is ______. (answer in integer)

    Official answer: 30