

MCQOPTIONS
Saved Bookmarks
This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your Compilers knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon- and unit-production to parse a string with n tokens? |
A. | n/2 |
B. | n-1 |
C. | 2n-1 |
D. | 2^n |
Answer» C. 2n-1 | |
2. |
In the context of abstract-syntax-tree and control-flow-graph. Which one of the following is true? |
A. | In both AST and CFG if node N2 be the successor of node N1 |
B. | For any input program, neither AST nor CFG will contain a cycle |
C. | The max number of successors of a node in an AST and a CFG depends on the input program |
D. | None of the mentioned |
Answer» D. None of the mentioned | |