

MCQOPTIONS
Saved Bookmarks
This section includes 3 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 data structure in a complier is used for managing information about variables and their attributes? |
A. | Abstract syntax tree |
B. | Symbol table |
C. | Semantic stack |
D. | Parse table |
Answer» C. Semantic stack | |
2. |
An LALR(1) parser for a grammar can have shift-reduce (S-R) conflicts if and only if ___________ |
A. | The SLR(1) parser for G has S-R conflicts |
B. | The LR(1) parser for G has S-R conflicts |
C. | The LR(0) parser for G has S-R conflicts |
D. | The LALR(1) parser for G has reduce-reduce conflicts |
Answer» C. The LR(0) parser for G has S-R conflicts | |
3. |
Some code optimizations are carried out on the intermediate code because _______________ |
A. | They enhance the portability of the complier to other target processors |
B. | Program analysis is name accurate on intermediate code than on machine code |
C. | The information from data flow analysis cannot otherwise be used for optimization |
D. | The information from the front end cannot otherwise be used for optimization |
Answer» C. The information from data flow analysis cannot otherwise be used for optimization | |