📜  门| GATE-CS-2015(套装2)|第 65 题

📅  最后修改于: 2021-09-25 04:29:14             🧑  作者: Mango

在抽象语法树 (AST) 和控制流图 (CFG) 的上下文中,以下哪一项是正确的?
(A)在 AST 和 CFG 中,让节点 N2 成为节点 N1 的后继。在输入程序中,N2对应的代码出现在N1对应的代码之后
(B)对于任何输入程序,AST 和 CFG 都不包含循环
(C) AST 和 CFG 中节点的最大后继数取决于输入程序
(D) AST 和 CFG 中的每个节点最多对应输入程序中的一条语句答案: (C)
解释:

(A) is false, In CFG (Control Flow Graph), code of N2
may be present before N1 when there is a loop or goto.

(B) is false, CFG (Control Flow Graph) contains cycle
when input program has loop.

(C) is true, successors in AST and CFG depedend on
input program

(D) is false, a single statement may belong to a block
of statements. 

这个问题的测验