Skip to content
VUBuddy

CS606 Quiz 4

Compiler Construction PDF 846 KBUpdated 23 Oct 2026
Quiz CS606 Quiz 4 PDF 846 KB
vubuddy.com
Type
Quiz
Course
CS606 Compiler Construction
Size
PDF 846 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 846 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 of 2. Download the file for all 2 pages.

Q1. In YACC, what does the notation $2 refer to?

  1. The second symbol on the right-hand side of a production
  2. The first symbol on the left-hand side of a production
  3. The first symbol on the right-hand side of a production
  4. The second symbol on the left-hand side of a production

Correct answer: The second symbol on the right-hand side of a production

Q2. What is the purpose of analyzing attribute rules in the rule-based methodology of attribute grammar evaluation?

  1. To optimize the attribute computation process
  2. To generate the parse tree
  3. To establish a fixed ordering of attribute evaluation
  4. To determine the syntax of the source code

Correct answer: To establish a fixed ordering of attribute evaluation

Q3. What is the purpose of the $3 notation in YACC?

  1. To refer to the first symbol on the right-hand side of a production
  2. To refer to the third symbol on the right-hand side of a production
  3. To refer to the second symbol on the right-hand side of a production
  4. To refer to the fourth symbol on the right-hand side of a production

Correct answer: To refer to the third symbol on the right-hand side of a production

Q4. What is the purpose of using an intermediate representation (IR) in a compiler?

  1. To directly translate high-level code into machine code.
  2. To simplify the debugging process for the compiled code.
  3. To provide a structured and uniform representation for code analysis and transformation.
  4. To eliminate the need for multiple passes in the compilation process.

Correct answer: To provide a structured and uniform representation for code analysis and transformation.

Q5. What consideration might influence the choice of the attribute evaluation order in the oblivious methodology?

  1. Dynamic attribute dependencies
  2. Syntax tree generation algorithms
  3. Attribute propagation rules
  4. Optimization goals

Correct answer: Optimization goals

Q6. Which two linear intermediate representations (IRs) are commonly used in modern compilers?

  1. Assembly code and bytecode
  2. High-level language and low-level language
  3. Stack-machine code and three-address code
  4. Register-transfer language and SSA form

Correct answer: Stack-machine code and three-address code

Q7. Stack-machine code and three-address code are mutually exclusive and cannot be used together in modern compilers.

  1. True
  2. False

Correct answer: False

Q8. S --> A B A --> ∈ | aA B --> ∈ | bB. FIRST(S) contains ___ elements.

  1. 3
  2. 4
  3. 5
  4. 6

Correct answer: 3

Q9. In YACC specification file, different sections are separated by ____________ symbol.

  1. %%
  2. &&
  3. ##

Correct answer: %%

Q10. The size of an LR(1) parsing table can be calculated by multiplying the number of ___________ with the number of symbols.

  1. Terminals
  2. Actions
  3. States
  4. Rules

Correct answer: States

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.