Skip to content
VUBuddy

CS606 Final Term Quiz 4 Jan 2024 by Miss Mehwish

Compiler Construction PDF 429 KBUpdated 23 Oct 2026
Quiz CS606 Final Term Quiz 4 Jan 2024 by Miss Mehwish PDF 429 KB
vubuddy.com
Type
Quiz
Course
CS606 Compiler Construction
Size
PDF 429 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 429 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

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
  1. 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
All CS606 files →
CS606 Compiler Construction All CS606 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.