Skip to main content

Compiler Construction MCQs with Answers

Practice important Compiler Construction MCQs with answers and explanations.

Multiple Choice Questions

Q991: The routine that returns a new temporary variable is called ______.
  • A: lookup
  • B: emit
  • C: newtemp
  • D: install
View Answer
C

Q992: The symbol table can be implemented as a ______ for efficient lookup.
  • A: binary tree
  • B: hash table
  • C: linked list
  • D: stack
View Answer
B

Q993: The attribute that records the symbol table location in translation is called ______.
  • A: E.name
  • B: E.place
  • C: E.value
  • D: E.temp
View Answer
B

Q994: The production E โ†’ โ€“ E1 generates code using ______ to negate the operand.
  • A: newtemp
  • B: emit
  • C: lookup
  • D: install
View Answer
B

Q995: The translation scheme for E โ†’ E1 * E2 generates a three-address code using the operator ______.
  • A: +
  • B: *
  • C: -
  • D: /
View Answer
B

Q996: The translation scheme for E โ†’ id uses ______ to get the address of id.
  • A: newtemp
  • B: lookup
  • C: emit
  • D: install
View Answer
B

Q997: Three-address code is reasonably ______ compared to other IR forms.
  • A: verbose
  • B: compact
  • C: complex
  • D: slow
View Answer
B

Q998: In three-address code, the statement format is generally:
  • A: x โ† y op z
  • B: op x y z
  • C: y โ† op x z
  • D: x โ† op y z
View Answer
A

Q999: The purpose of newtemp() is to generate ______.
  • A: new operators
  • B: new symbol table entries
  • C: new temporary variables
  • D: new identifiers
View Answer
C

Q1000: In the translation scheme, E โ†’ ( E1 ) sets E.place to ______.
  • A: E1.place
  • B: newtemp()
  • C: id.name
  • D: emit statement
View Answer
A

Test Your Knowledge

Take a timed quiz on Compiler Construction

๐Ÿš€ Start Quiz Now