Skip to main content

Compiler Construction MCQs with Answers

Practice important Compiler Construction MCQs with answers and explanations.

Multiple Choice Questions

Q131: What does NP-Complete indicate about a problem like register allocation?
  • A: It has no known efficient solution
  • B: It’s a programming language
  • C: It’s a compiler error
  • D: It’s a syntax feature
View Answer
A

Q132: _______ architecture uses a simple set of instructions.
  • A: RISC
  • B: CISC
  • C: VLSI
  • D: ISA
View Answer
A

Q133: CISC architecture offers ______.
  • A: Minimal instructions
  • B: Rich set of instructions and addressing modes
  • C: Limited addressing
  • D: Lexical analysis
View Answer
B

Q134: Which stage performs run-time error/exception processing?
  • A: Middle end
  • B: IR generator
  • C: Runtime system
  • D: Parser
View Answer
C

Q135: In compiler construction, IR stands for ______.
  • A: Intermediate Rule
  • B: Intermediate Representation
  • C: Instruction Reader
  • D: Input Register
View Answer
B

Q136: The optimizer can move computations to ______.
  • A: Frequently executed paths
  • B: Less frequently executed paths
  • C: Main memory
  • D: Registers
View Answer
B

Q137: During optimization, a constant value may be ______.
  • A: Skipped
  • B: Extracted and replaced
  • C: Removed entirely
  • D: Changed into variable
View Answer
B

Q138: One pass in the optimizer might involve ______.
  • A: Code styling
  • B: Loop unrolling
  • C: Instruction decoding
  • D: Removing IDE-specific tags
View Answer
B

Q139: What is the first component of the front-end of a compiler?
  • A: Scanner
  • B: Parser
  • C: Lexer
  • D: Optimizer
View Answer
A

Q140: The scanner breaks the input stream into ________.
  • A: commands
  • B: instructions
  • C: tokens
  • D: bytes
View Answer
C

Test Your Knowledge

Take a timed quiz on Compiler Construction

🚀 Start Quiz Now