GATE CSE 2026 — Previous Year Questions
Real questions from the 2026 paper with options and answers. Take a timed test →
70 questions · page 2 of 3
Q26 · Computer Science & IT
Consider the following 4-variable Boolean function 𝐹(𝐴, 𝐵, 𝐶, 𝐷) = Σ𝑚(0, 1, 2, 3, 8, 9, 10, 11) 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- A.𝐴′ + 𝐵′ + 𝐶′ + 𝐷′
- B.𝐵′
- C.𝐴′. 𝐵′ + 𝐴 . 𝐵
- D.𝐴′
Show answer / उत्तर देखें
Answer: B 𝐵′
Official GATE 2026 answer key: (B).Q27 · Computer Science & IT
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 comp ute the closure of F, Armstrong’ s Axioms can be applied. Consider 𝑋, 𝑌, and 𝑍 as sets of attributes over a relational schema. The three rules of Armstrong’s Axioms are described as follows. Reflexivity: If 𝑌 ⊆ 𝑋 , then 𝑋 → 𝑌 Augmentation: If 𝑋 → 𝑌, then 𝑋𝑍 → 𝑌𝑍 for any Z Transitivity: If 𝑋 → 𝑌 and 𝑌 → 𝑍, then 𝑋 → 𝑍 The additional rule of Union is defined as follows. Union: If 𝑋 → 𝑌 and 𝑋 → 𝑍, then 𝑋 → 𝑌𝑍 It can be proved that the additional rule of Union is also implied by the three rules of Armstrong’s Axioms. L isted below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof ?- A.Reflexivity, Augmentation, and Transitivity
- B.Reflexivity and Augmentation
- C.Transitivity
- D.Augmentation and Transitivity
Show answer / उत्तर देखें
Answer: D Augmentation and Transitivity
Official GATE 2026 answer key: (D).Q28 · Computer Science & IT
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?- A.011
- B.101
- C.000
- D.100
Show answer / उत्तर देखें
Answer: D 100
Official GATE 2026 answer key: (D).Q29 · Computer Science & IT
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?- A.8
- B.4
- C.64
- D.16
Show answer / उत्तर देखें
Answer: B 4
Official GATE 2026 answer key: (B).Q30 · Computer Science & IT
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?- A.Both S1 and S2 are true
- B.Both S1 and S2 are false
- C.S1 is true and S2 is false
- D.S1 is false and S2 is true
Show answer / उत्तर देखें
Answer: A Both S1 and S2 are true
Official GATE 2026 answer key: (A).Q31 · Computer Science & IT
Consider 4 × 4 matrices with their elements from {𝟎, 𝟏}. The number of such matrices with even number of 𝟏s in every row and every column is- A.512
- B.1025
- C.1023
- D.255
Show answer / उत्तर देखें
Answer: A 512
Official GATE 2026 answer key: (A).Q32 · Computer Science & IT
Consider the following recurrence relations: For all 𝑛 > 1, 𝑇1(𝑛) = 4𝑇1 (𝑛 2) + 𝑇2(𝑛) 𝑇2(𝑛) = 5𝑇2 (𝑛 4) + Θ(log2 𝑛) Assume that for all 𝑛 ≤ 1, 𝑇1(𝑛) = 1 and 𝑇2(𝑛) = 1. Which one of the following options is correct?- A.𝑇1(𝑛) = Θ(𝑛2)
- B.𝑇1(𝑛) = Θ(𝑛2 log2 𝑛)
- C.𝑇1(𝑛) = Θ(𝑛log4 5)
- D.𝑇1(𝑛) = Θ(𝑛log4 5 log2 𝑛)
Show answer / उत्तर देखें
Answer: A 𝑇1(𝑛) = Θ(𝑛2)
Official GATE 2026 answer key: (A).Q33 · Computer Science & IT
The size of the physical address space of a processor is 232 bytes. The capacity of a cache memory unit is 223 bytes. The cache block size is 1 28 byte s. The cache memory unit can be built as a direct mapped cache or as a 𝐾-way set-associative cache, where 𝐾 = 2𝐿 and 𝐿 ∈ {1, 2, 3}. Let the length of the TAG field be 𝑀 bits for the direct mapped cache, and 𝑁 bits for the set-associative cache. Which one of the following options is true?- A.𝑁 = 𝑀 + 𝐿
- B.𝑁 = 𝑀 − 𝐿
- C.𝑁 = 𝑀 + 𝐾
- D.𝑁 = 𝑀 − 𝐾
Show answer / उत्तर देखें
Answer: A 𝑁 = 𝑀 + 𝐿
Official GATE 2026 answer key: (A).Q34 · Computer Science & IT
Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer variable head. struct node{ int elt; struct node *next; }; int getListSize (struct node *head) { if( E1 ) return 1; return E2; } Which one of the following options gives the correct replacements for the expressions E1 and E2?- A.E1: head == NULL E2: 1 + getListSize(head)
- B.E1: head->next == NULL E2: 1 + getListSize(head->next)
- C.E1: head == NULL E2: 1 + getListSize(head->next)
- D.E1: head->next == NULL E2: 1 + getListSize(head)
Show answer / उत्तर देखें
Answer: B E1: head->next == NULL E2: 1 + getListSize(head->next)
Official GATE 2026 answer key: (B).Q35 · Computer Science & IT
Consider a relational database schema with two relations 𝑅(𝑃, 𝑄) and 𝑆(𝑋, 𝑌). Let 𝐸 = {⟨𝑢⟩ ∣ ∃𝑣 ∃𝑤 ⟨𝑢, 𝑣⟩ ∈ 𝑅 ∧ ⟨𝑣, 𝑤⟩ ∈ 𝑆} be a tuple relational calculus expression. Which one of the following relational algebraic expressions is equivalent to 𝐸 ?- A.𝛱𝑃(𝑅 ⋈𝑅.𝑃=𝑆.𝑋 𝑆)
- B.𝛱𝑃(𝑆 ⋈𝑆.𝑋=𝑅.𝑄 𝑅)
- C.𝛱𝑃(𝑅 ⋈𝑅.𝑃=𝑆.𝑌 𝑆)
- D.𝛱𝑃(𝑆 ⋈𝑆.𝑌=𝑅.𝑄 𝑅)
Show answer / उत्तर देखें
Answer: B 𝛱𝑃(𝑆 ⋈𝑆.𝑋=𝑅.𝑄 𝑅)
Official GATE 2026 answer key: (B).Q36 · Computer Science & IT
Which one of the following statements is equivalent to the following assertion? Turing machine 𝑀 decides the language 𝐿 ⊆ {0,1}∗- A.Turing machine 𝑀 halts on all input strings in {0,1}∗
- B.Turing machine 𝑀 accepts all input strings in 𝐿
- C.Turing machine 𝑀 rejects all input strings in {0,1}∗ − 𝐿
- D.Turing machine 𝑀 accepts all input strings in 𝐿 and rejects all input strings in {0,1}∗ − 𝐿
Show answer / उत्तर देखें
Answer: D Turing machine 𝑀 accepts all input strings in 𝐿 and rejects all input strings in {0,1}∗ − 𝐿
Official GATE 2026 answer key: (D).Q37 · Computer Science & IT
The probability density function 𝑓(𝑥) of a random variable 𝑋 which takes real values is 𝑓(𝑥) = 1 3√2𝜋 exp (− 𝑥2 18), 𝑥 ∈ (−∞, +∞) Which one of the following statements is correct about the random variable 𝑋 ?- A.𝑋 is an exponential random variable
- B.𝑋 is a normal random variable
- C.𝑋 is a Poisson random variable
- D.𝑋 is a uniform random variable
Show answer / उत्तर देखें
Answer: B 𝑋 is a normal random variable
Official GATE 2026 answer key: (B).Q38 · Computer Science & IT
Consider the following three ANSI-C programs, P1, P2, and P3. P1 P2 P3 #include <stdio.h> int a=5; int main(){ int a=7; return(0); } #include <stdio.h> int main(){ int a=5; int a=7; return(0); } #include <stdio.h> int main(){ int a=5; float a=7; return(0); } Which one of the following statements is true?- A.Only P1 will compile without any error
- B.Only P2 will compile without any error
- C.Only P3 will compile without any error
- D.All three programs P1, P2, and P3 will compile without any error
Show answer / उत्तर देखें
Answer: A Only P1 will compile without any error
Official GATE 2026 answer key: (A).Q39 · Computer Science & IT
Consider a table 𝑇, where the elements 𝑇[𝑖][𝑗], 0 ≤ 𝑖, 𝑗 ≤ 𝑛, 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: 𝑇[0][𝑘] = 𝑇[𝑘][0] = 1 for 𝑘 = 0,1,2, … , 𝑛 𝑇[𝑖][𝑗] = 2𝑇[𝑖 − 1][𝑗] + 3𝑇[𝑖][𝑗 − 1] for 1 ≤ 𝑖, 𝑗 ≤ 𝑛 Consider the following two algorithms to compute entries of 𝑇. Assume that for both the algorithms, for all 0 ≤ 𝑖, 𝑗 ≤ 𝑛, 𝑇[𝑖][𝑗] has been initialized to 1. Algorithm 𝐵𝑘, 𝑘 ∈ {1,2} is said to be correct if and only if it calculates the correct values of 𝑇[𝑖][𝑗], for all 0 ≤ 𝑖, 𝑗 ≤ 𝑛, (as per the recursive formulation) at the end of the execution of the algorithm 𝐵𝑘. Which one of the following statements is true?- A.Both algorithms 𝐵1 and 𝐵2 are correct
- B.Algorithm 𝐵1 is correct, but algorithm 𝐵2 is incorrect
- C.Algorithm 𝐵2 is correct, but algorithm 𝐵1 is incorrect
- D.Both algorithms 𝐵1 and 𝐵2 are incorrect Algorithm 𝐵2: For 𝑠 = 2, 3, … , 2𝑛 For 𝑖 = 1, 2, … , 𝑛 For 𝑗 = 1, 2, … , 𝑛 If (𝑖 + 𝑗 == 𝑠) 𝑇[𝑖][𝑗] = 2𝑇[𝑖 − 1][𝑗] + 3𝑇[𝑖][𝑗 − 1] Algorithm 𝐵1: For 𝑖 = 1, 2, … , 𝑛 For 𝑗 = 1, 2, … , 𝑛 𝑇[𝑖][𝑗] = 2𝑇[𝑖 − 1][𝑗] + 3𝑇[𝑖][𝑗 − 1]
Show answer / उत्तर देखें
Answer: A Both algorithms 𝐵1 and 𝐵2 are correct
Official GATE 2026 answer key: (A).Q40 · Computer Science & IT
Consider the canonical 𝐿𝑅(0) 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 𝐿𝑅(0) ACTION table?- A.2
- B.3
- C.4
- D.5
Show answer / उत्तर देखें
Answer: D 5
Official GATE 2026 answer key: (D).Q41 · Computer Science & IT
An urn contains one red ball and one blue ball. At each step, a ball is picked uniformly at random from the urn, and this ball together with another ball of the same color is put back in the urn. The probability that there are equal number of red and blue balls after two steps is- A.1/4
- B.1/3
- C.1/2
- D.2/3
Show answer / उत्तर देखें
Answer: B 1/3
Official GATE 2026 answer key: (B).Q42 · Computer Science & IT
Consider a processor P whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any instruction is the destination operand. Which one of the following sequences of instructions corresponds to the high-level language statement Z = X + Y ? Note: X, Y, and Z are memory operands. R0, R1, and R2 are registers.- A.ADD Z, X, Y
- B.LOAD R0, X ADD Z, R0, Y
- C.ADD R0, X, Y STORE Z, R0
- D.LOAD R0, X LOAD R1, Y ADD R2, R0, R1 STORE Z, R2
Show answer / उत्तर देखें
Answer: D LOAD R0, X LOAD R1, Y ADD R2, R0, R1 STORE Z, R2
Official GATE 2026 answer key: (D).Q43 · Computer Science & IT
With respect to a TCP connection between a client and a server, which one of the following statements is true?- A.The client and server use a two-way handshake mechanism before the start of data transmission
- B.The server cannot initiate closing of the connection before the client initiates closing of the connection
- C.The TCP connection is half-duplex
- D.The client and server can initiate closing of the connection at the same time
Show answer / उत्तर देखें
Answer: D The client and server can initiate closing of the connection at the same time
Official GATE 2026 answer key: (D).Q44 · Computer Science & IT
The size of the physical address space of a processor is 232 bytes. The capacity of a cache memory unit is 223 bytes. The cache block size is 128 bytes. The cache memory unit can be built as a direct mapped cache or as a 𝐾-way set-associative cache, where 𝐾 = 2𝐿 and 𝐿 ∈ {1, 2, 3}. Let the length of the TAG field be 𝑀 bits for the direct mapped cache, and 𝑁 bits for the set-associative cache. Which one of the following options is true?- A.𝑁 = 𝑀 + 𝐿
- B.𝑁 = 𝑀 − 𝐿
- C.𝑁 = 𝑀 + 𝐾
- D.𝑁 = 𝑀 − 𝐾
Show answer / उत्तर देखें
Answer: A 𝑁 = 𝑀 + 𝐿
Official GATE 2026 answer key: (A).Q45 · Computer Science & IT
A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism’s slow-start threshold is set to 10000 segments. Assume that the round-trip time is fixed at 1 millisecond. Assume that the sender always has data to send, the segments are numbered from 1, and no segment is lost. Let 𝑡 denote the time (in milliseconds) at which the transmission of segment number 2000 starts. Which one of the following options is correct?- A.9 ≤ 𝑡 < 10
- B.10 ≤ 𝑡 < 11
- C.11 ≤ 𝑡 < 12
- D.12 ≤ 𝑡 < 13
Show answer / उत्तर देखें
Answer: B 10 ≤ 𝑡 < 11
Official GATE 2026 answer key: (B).Q46 · Computer Science & IT
The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. T S I: Inorder L: left subtree, node, right subtree II: Preorder M: node, left subtree, right subtree III: Postorder N: left subtree, right subtree, node Which one of the following is the correct match from T to S ?- A.I – L, II – M, III – N
- B.I – M, II – L, III – N
- C.I – N, II – M, III – L
- D.I – L, II – N, III – M
Show answer / उत्तर देखें
Answer: A I – L, II – M, III – N
Official GATE 2026 answer key: (A).Q47 · Computer Science & IT
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 ?- A.Both S1 and S2 are true
- B.Both S1 and S2 are false
- C.S1 is true and S2 is false
- D.S1 is false and S2 is true
Show answer / उत्तर देखें
Answer: C S1 is true and S2 is false
Official GATE 2026 answer key: (C).Q48 · Computer Science & IT
Consider concurrent execution of two transactions 𝑇1 and 𝑇2 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?- A.Both 𝑇1 and 𝑇2 only read 𝐴
- B.𝑇1 reads 𝐴 and 𝑇2 writes 𝐴
- C.𝑇1 writes 𝐴 and 𝑇2 reads 𝐴
- D.Both 𝑇1 and 𝑇2 write 𝐴
Show answer / उत्तर देखें
Answer: A Both 𝑇1 and 𝑇2 only read 𝐴
Official GATE 2026 answer key: (A).Q49 · Computer Science & IT
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=106, 1k=103- A.731
- B.64
- C.8
- D.16
Show answer / उत्तर देखें
Answer: B 64
Official GATE 2026 answer key: (B).Q50 · Computer Science & IT
Consider the canonical 𝐿𝑅(0) 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 𝐿𝑅(0) ACTION table?- A.2
- B.3
- C.4
- D.5
Show answer / उत्तर देखें
Answer: D 5
Official GATE 2026 answer key: (D).