GATE 2026 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2026 (Session 2)

65 questions

MCQ 35 · MSQ 11 · NAT 191-mark 30 · 2-mark 35

Questions 41–45 of 65

Q41Parsing2 marksMCQ−0.67 if wrong
Consider the canonical LR(0)L R(0) parsing of the grammar below using terminals {a,b,c}\{a, b, c\} and non-terminals {A,B,C,S}\{A, B, C, S\} with SS as the start symbol.

S→ACBA→aA∣ϵC→cC∣ϵB→bB∣b\begin{array}{l} S \rightarrow A C B \\ A \rightarrow a A \mid \epsilon \\ C \rightarrow c C \mid \epsilon \\ B \rightarrow b B \mid b \end{array}

Which one of the following options gives the number of shift-reduce conflicts that will occur in the LR(0)L R(0) ACTION table?

Q42Normal Form2 marksMCQ−0.67 if wrong
In the context of schema normalization in relational DBMS, consider a set F\text{F} of functional dependencies. The set of all functional dependencies implied by F\text{F} is called the closure of F\text{F}. To compute the closure of F\text{F}, Armstrong's Axioms can be applied. Consider X,YX, Y, and ZZ as sets of attributes over a relational schema. The three rules of Armstrong's Axioms are described as follows.

Reflexivity: If Y⊆XY \subseteq X, then X→YX \rightarrow Y
Augmentation: If X→YX \rightarrow Y, then XZ→YZX Z \rightarrow Y Z for any Z
Transitivity: If X→YX \rightarrow Y and Y→ZY \rightarrow Z, then X→ZX \rightarrow Z

The additional rule of Union is defined as follows.

Union: If X→YX \rightarrow Y and X→ZX \rightarrow Z, then X→YZX \rightarrow Y Z

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?

Q44Machine Instruction2 marksMCQ−0.67 if wrong
Consider a processor that has 1616 general purpose registers and it uses 22-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 22 register operands and a 66-bit immediate operand. Each Rtype instruction has 33 register operands. Each C-type instruction has a register operand and a 66 -bit offset value. If there are 22 unique M-type opcodes and 77 unique R-type opcodes, which one of the following options gives the maximum number of unique opcodes possible for C-type instructions?

Q45Intermediate Code Generation2 marksMCQ−0.67 if wrong
Consider the control flow graph given below.
ENTRYEXIT B1B2B3B4 a = b + cd = a + ee = a + fg = d + e
Which one of the following options is the set of live variables at the exit point of each basic block?