Intermediate Representations (IR): Three-Address Code, Syntax Trees, DAGs MCQs

15 min Score: 0 Attempted: 0/15 Subscribe
1. What is the purpose of using Intermediate Representations (IR) in a compiler?





2. Which of the following is a key feature of Three-Address Code (TAC)?





3. In Three-Address Code, how is a typical statement represented?





4. Which of the following is true about Syntax Trees?





5. What does a Directed Acyclic Graph (DAG) represent in compiler optimization?





6. What is the main difference between a Syntax Tree and a Directed Acyclic Graph (DAG)?





7. Why is Three-Address Code considered an important intermediate representation?





8. What is the primary advantage of using DAGs in intermediate code representation?





9. Which of the following is NOT a feature of Three-Address Code (TAC)?





10. In a Syntax Tree, which of the following represents the root node?





11. Which intermediate representation would be most efficient for optimizing arithmetic expressions in a program?





12. What does a “common subexpression” refer to in a DAG?





13. How does the use of Three-Address Code (TAC) affect the optimization phase of a compiler?





14. Which of the following best describes a Directed Acyclic Graph (DAG) used in compilers?





15. Which of the following is a benefit of using DAGs for expression evaluation in compilers?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials