CS606 Final Term Quiz 4 Jan 2024 by Miss Mehwish
- Type
- Quiz
- Course
- CS606 Compiler Construction
- Size
- PDF 429 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 4. Download the file for all 4 pages.
Past Papers for Mids./Finals are also Available
Q1. What is the first step performed by the compiler application when using the dynamic method in attribute grammar evaluation?
- A. Evaluating attributes in topological order
- B. Performing a topological sort
- C. Constructing the parse tree
- D. Building the dependence graph
Q2. Which of the following is NOT a typical use of attributed trees in compiler design?
- A. Type checking
- B. Optimization
- C. Error handling
- D. Syntax analysis
Correct option: C
Q3. Why have LALR(1) grammars become a standard for parser generators?
- A. They allow for automatic code generation.
- B. They are compatible with natural languages.
- C. They offer better performance than other grammars.
- D. They have widespread adoption and support for programming languages.
Q4. What does the symbol table use to uniquely identify each symbol?
- A. Location
- B. Name
- C. Scope
- D. Type
Q5. What does the notation $$ refer to in YACC?
- A. The symbol on the up-hand side of the production
- B. The symbol on the left-hand side of the production
- C. The symbol on the down-hand side of the production
- D. The symbol on the right-hand side of the production
Q6. In the modified parser for the implementation of ad-hoc scheme for semantic analysis, what happens when a reduction by the production rule A → β occurs?
- A. The parser pushes 2×|β| items onto the stack.
- B. The parser pops 3×|β| items from the stack.
- C. The parser pushes 3×|β| items onto the stack.
- D. The parser pops 2×|β| items from the stack.
Q7. Which section in a YACC specification file contains the "c/c++ functions"?
- 1
- 2
- 3
- 4
Correct option: 3
Q8. In three-address code, how many bytes are typically used to represent operations?
- A. 3 to 4 bytes
- B. 1 to 2 bytes
- C. 5 to 6 bytes
- D. 7 to 8 bytes
- The size of an LR(1) parsing table can be calculated by multiplying the number of ___________ with the number of symbols.
- A. States
- B. Terminals
- C. Rules
- D. Actions
Correct option: A and B
Q10. What is the purpose of the $3 notation in YACC?
- A. To refer to the first symbol on the right-hand side of a production
- B. To refer to the third symbol on the right-hand side of a production
- C. To refer to the second symbol on the right-hand side of a production
- D. To refer to the fourth symbol on the right-hand side of a production
Related CS606 files
All CS606 files →- CS606 Final Term Current Papers 2022 by Masters Final term PDF 2.3 MB
- CS606 Final Term Current Papers 2022-2023 by Masters Final term PDF 3.1 MB
- CS606 Final Term MCQs 2016 Final term PDF 2.4 MB
- CS606 Final Term Past Paper 2014 Final term PDF 281 KB
- CS606 Highlighted Handouts Set 3 by Masters Highlighted PDF 4.8 MB
- CS606 Final Term MCQs by Waqar Siddhu Final term PDF 3.7 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.