1
GATE CSE 2025 Set 2
MCQ (Single Correct Answer)
+1
-0.33

Given the following syntax directed translation rules :

Rule 1 : $R \rightarrow A B\{B . i=R . i-1 ; A . i=B . i R . i=A . i+1 ;\}$

Rule 2 : $P \rightarrow C D\{P . i=C . i+D . i ; D . i=C . i+2\}$

Rule 3 : $Q \rightarrow E F\{Q . i=E . i+F . i ;\}$

Which ONE is the CORRECT option among the following?

A
Rule 1 is S -attributed and L-attributed; Rule 2 is S -attributed and not L-attributed; Rule 3 is neither S -attributed nor L-attributed
B
Rule 1 is neither S-attributed nor L-attributed: Rule 2 is S-attributed and L-attributed: Rule 3 is S-attributed and L-attributed
C
Rule 1 is neither S-attributed nor L-attributed; Rule 2 is not S -attributed and is Lattributed; Rule 3 is S -attributed and L-attributed
D
Rule 1 is S-attributed and not L-attributed; Rule 2 is not S-attributed and is Lattributed: Rule 3 is S -attributed and L-attributed
2
GATE CSE 2021 Set 2
MCQ (Single Correct Answer)
+1
-0.33

Consider the following ANSI C program:

int main() {

Integer x;

return 0;

}

Which one of the following phases in a seven-phase C compiler will throw an error?  

A
Syntax analyzer
B
Semantic analyzer
C
Machine dependent optimizer
D
Lexical analyzer
3
GATE CSE 2016 Set 1
Numerical
+1
-0
Consider the following code segment.
x = u - t;
y = x * v;
x = y + w;
y = t - z;
y = x * y;
The minimum number of total variables required to convert the above code segment to static single assignment form is .
Your input ____
4
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+1
-0.3
In the context of abstract-syntax-tree $$(AST)$$ and control-flow-graph $$(CFG),$$ which one of the following is TRUE?
A
In both $$AST$$ and $$CFG,$$ let node $${N_2}$$ be the successor of node $${N_1}.$$ In the input program, the code corresponding to $${N_2}$$ is present after the code corresponding to $${N_1}$$
B
For any input program, neither $$AST$$ nor $$CFG$$ will contain a cycle
C
The maximum number of successors of a node in an $$AST$$ and a $$CFG$$ depends on the input program
D
Each node in $$AST$$ and $$CFG$$ corresponds to at most one statement in the input program
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP