1
GATE CSE 2026 Set 1
MCQ (Single Correct Answer)
+2
-0

$$ \text { Consider the control flow graph shown in the figure. } $$

GATE CSE 2026 Set 1 Compiler Design - Code Generation and Optimization Question 1 English

Which one of the following options correctly lists the set of redundant expressions (common sub-expressions) in the basic blocks B4 and B5?

Note: All the variables are integers.

A

$$ \begin{aligned} & \text { B4: }\{b+i\} \\ & \text { B5: }\{c+m\} \end{aligned} $$

B

$$ \begin{aligned} & \text { B4: }\{g * k\} \\ & \text { B4: }\{c+m\} \end{aligned} $$

C

$$ \begin{aligned} & \text { B4: }\{g * k, b+i\} \\ & \text { B5: }\} \end{aligned} $$

D

$$ \begin{aligned} & \text { B4: }\{g * k\} \\ & \text { B5: }\} \end{aligned} $$

2
GATE CSE 2026 Set 1
MCQ (More than One Correct Answer)
+2
-0

$$ \text { Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations. } $$

SDD1
Grammar(G1) $$
\text { Semantic Rules }
$$
$$
\mathrm{D} \rightarrow \mathrm{TV}
$$
$$
\begin{aligned}
& \text { D.type = T.type } \\
& \text { V.type = T.type }
\end{aligned}
$$
$$
\mathrm{T} \rightarrow \mathrm{int}
$$
$$
\text { T.type = int }
$$
$$
\mathrm{T} \rightarrow \text { float }
$$
$$
\text { T.type = float }
$$
$$
\mathrm{V} \rightarrow \mathrm{~V}_1 \mathrm{id}
$$
$$
\begin{aligned}
& V_1 \cdot \text { type }=\text { V.type } \\
& \text { put(id.entry, V.type) }
\end{aligned}
$$
$$
\mathrm{V} \rightarrow \mathrm{id}
$$
$$
\text { put(id.entry, V.type) }
$$
SDD2
Grammar(G2) $$
\text { Semantic Rules }
$$
$$
\mathrm{D} \rightarrow D_1 \mathrm{id}
$$
$$
\begin{aligned}
& \text { D.type }=D_1 \cdot \text { type } \\
& \text { put(id.entry, } D_1 \cdot \text { type) }
\end{aligned}
$$
$$
\mathrm{D} \rightarrow \mathrm{~T} \text { id }
$$
$$
\begin{aligned}
& \text { D.type = T.type } \\
& \text { put(id.entry, T.type) }
\end{aligned}
$$
$$
\mathrm{T} \rightarrow \text { int }
$$
$$
\text { T.type = int }
$$
$$
\mathrm{T} \rightarrow \text { float }
$$
$$
\text { T.type = float }
$$
$D$ is the start symbol, and int, float and id are the three terminals. The non-terminal $V_1$ is the same as $V$ and the non-terminal $D_1$ is the same as $D$. Here, the subscript is used to differentiate the grammar symbols on the two sides of a production. The function put updates the symbol table with the type information for an identifier. Let $P$ and $Q$ be the languages specified by grammars G1 and G2, respectively. Which of the following statements is/are true?
A

The languages P and Q are the same

B

SDD2 is S-attributed and contains only synthesized attributes

C

SDD1 is L-attributed and contains only inherited attributes

D

The specifications of SDD1 and SDD2 are such that the same entries get added to the symbol table

3
GATE CSE 2026 Set 1
MCQ (Single Correct Answer)
+1
-0

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.

4
GATE CSE 2026 Set 1
MCQ (More than One Correct Answer)
+1
-0

Which of the following statements is/are true with respect to the interaction of a web browser with a web server using HTTP 1.1?

A

HTTP 1.1 facilitates downloading multiple objects of the same webpage over the same TCP connection, if the objects are stored in the same server.

B

HTTP 1.1 facilitates downloading multiple objects of the same webpage over the same TCP connection, even if they are stored in different servers.

C

HTTP 1.1 facilitates sending a request for downloading one object without waiting for a previously requested object to be downloaded completely.

D

HTTP 1.1 facilitates downloading multiple webpages on the same server to be downloaded over a single TCP connection.