Skip to main content

Compiler Construction MCQs with Answers

Practice important Compiler Construction MCQs with answers and explanations.

Multiple Choice Questions

Q581: LL(1) parsers are ________ driven and use a parsing table.
  • A: stack
  • B: recursion
  • C: top-down
  • D: token
View Answer
A

Q582: ________ sets help determine which production to use for a given input symbol.
  • A: FOLLOW
  • B: FIRST
  • C: LAST
  • D: NEXT
View Answer
B

Q583: ________ is included in FIRST(X) if X can derive a string starting with b.
  • A: b
  • B: e
  • C: $
  • D: A
View Answer
A

Q584: Parsing tables in LL(1) grammar have rows for ________ and columns for ________.
  • A: terminals, non-terminals
  • B: non-terminals, terminals
  • C: start symbols, productions
  • D: productions, rules
View Answer
B

Q585: What is the FIRST set of a terminal symbol 'b'?
  • A: {ε}
  • B: {b}
  • C: {b, ε}
  • D: {}
View Answer
B

Q586: Which of the following is true for computing FIRST(X) when X → A1 A2 ... An?
  • A: Add FIRST(A1) including ε
  • B: Add only ε from A1
  • C: Add FIRST(A1) excluding ε and continue if ε ∈ FIRST(A1)
  • D: Stop if FIRST(A1) is empty
View Answer
C

Q587: What is added to FOLLOW(S), where S is the start symbol?
  • A: +
  • B: (
  • C: $
  • D: *
View Answer
C

Q588: In computing FIRST sets, if ε ∈ FIRST(bi), what action is taken?
  • A: Add {ε} to FIRST(bi)
  • B: Stop the loop
  • C: Skip bi
  • D: Continue to bi+1
View Answer
D

Q589: Which symbol is included in FIRST('(')?
  • A: {)}
  • B: {ε}
  • C: {(}
  • D: {id}
View Answer
C

Q590: What does the FOLLOW set of a non-terminal represent?
  • A: All terminals that can appear before the non-terminal
  • B: All terminals that can appear after the non-terminal
  • C: All terminals that derive ε
  • D: Only terminal id
View Answer
B

Test Your Knowledge

Take a timed quiz on Compiler Construction

🚀 Start Quiz Now