GATE CS 2015, set 2 · Question 28 · Compiler Design · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
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₂ be the successor of node N₁. In the input program, the code corresponding to N₂ is present after the code corresponding to N₁
- (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
Answer
Answer (C)
Answer from the official GATE CS 2015 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes