GATE 2015 CS (CS2) – Question 28
Which statement about abstract syntax trees (ASTs) and control-flow graphs (CFGs) is true?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) The maximum number of successors of a node in an AST and CFG depends on the input program
Explanation
AST branching depends on syntactic constructs and their number of children; CFG out-degree can depend on constructs such as multiway switches. Thus C. CFGs can contain loops, successor edges need not follow textual order, and a CFG basic block can contain several statements.