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

Let $G(V, E)$ be a simple, undirected, edge-weighted graph with unique edge weights. Which of the following statements about the minimum spanning trees (MST) of $G$ is/are true?

A

In every cycle $C$ of $G$, the edge with the largest weight in $C$ is not in any MST

B

In every cycle $C$ of $G$, the edge with the smallest weight in $C$ is in every MST

C

For every vertex $v \in V$, the edge with the largest weight incident on $v$ is not in any MST

D

For every vertex $v \in V$, the edge with the smallest weight incident on $v$ is in every MST

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

Consider the following C statements:

char str1 = "Hello; / Statement S1 */

char str2 = "Hello;"; / Statement S2 */

int str3 = "Hello"; / Statement S3 */

Which of the following options is/are correct?

A

S 1 and S 2 have syntactic errors

B

S 2 has a lexical error and S 3 has a syntactic error

C

S 1 has a lexical error and S 3 has a semantic error

D

S1 has a syntactic error and S3 has a semantic error

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

Which of the following statements is/are true?

A

$\mathrm{LL}(1)$ parser uses backtracking

B

For a grammar to be $\mathrm{LL}(1)$, it must be left-recursive

C

For a grammar to be $\mathrm{LL}(1)$, it must be left-factored

D

The $\mathrm{LL}(1)$ parsers are more powerful than the SLR parsers

4
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} $$