GATE 2015 [Set-2]
April 4, 2025GATE 2015 [Set-2]
April 4, 2025GATE 2015 [Set-2]
Question 20 |
In the context of abstract-syntax-tree (AST) and control-flow-graph (CFG), which one of the following is TRUE?
In both AST and CFG, let node, N2 be the successor of node N1. In the input program, the code corresponding to N2 is present after the code corresponding in N1.
| |
For any input program, neither AST nor CFG will contain a cycle
| |
The maximum number of successors of a node in an AST and a CFG depends on the input program
| |
Each node is AST and CFG corresponds to at most one statement in the input program |
Question 20 Explanation:
Optional (A) is not true when CFG contains cycle
Option (B) is false as CFG can contain cycle
Option (D) is false as a single node can contain block of statements.
Option (B) is false as CFG can contain cycle
Option (D) is false as a single node can contain block of statements.
Correct Answer: C
Question 20 Explanation:
Optional (A) is not true when CFG contains cycle
Option (B) is false as CFG can contain cycle
Option (D) is false as a single node can contain block of statements.
Option (B) is false as CFG can contain cycle
Option (D) is false as a single node can contain block of statements.