Skip to main content

Theory of Automata MCQs with Answers

Practice important Theory of Automata MCQs with answers and explanations.

Multiple Choice Questions

Q391: In CFG, what is the role of 'S'?
  • A: A terminal symbol
  • B: Start symbol
  • C: Nonterminal
  • D: End symbol
View Answer
B

Q392: What is the meaning of the production rule N โ†’ ฮ›?
  • A: N can be deleted from the string
  • B: N must repeat
  • C: N generates a nonterminal
  • D: N generates a terminal
View Answer
A

Q393: Which of the following is a non-terminal symbol in CFG?
  • A: a
  • B: S
  • C: b
  • D: โˆง
View Answer
B

Q394: What is the main purpose of a compiler in programming?
  • A: To translate assembly language
  • B: To translate high-level language
  • C: To compile machine code
  • D: To execute code
View Answer
B

Q395: Which of the following is an example of a Context Free Grammar (CFG) production rule?
  • A: S โ†’ aS
  • B: a โ†’ S
  • C: X โ†’ a + S
  • D: Y โ†’ a + ฮ›
View Answer
A

Q396: In CFG, what is the set of rules that define valid strings called?
  • A: Productions
  • B: Nonterminals
  • C: Syntax
  • D: Semantics
View Answer
A

Q397: What does S โ†’ SS mean in a context-free grammar?
  • A: S generates two S symbols
  • B: S generates two terminals
  • C: S generates a nonterminal and a terminal
  • D: S generates ฮ›
View Answer
A

Q398: A grammar where S โ†’ aS and S โ†’ ฮ› generates which of the following languages?
  • A: a*
  • B: b*
  • C: a+b
  • D: (a+b)*
View Answer
A

Q399: Which production rule allows deletion of nonterminal N?
  • A: N โ†’ a
  • B: N โ†’ ฮ›
  • C: N โ†’ S
  • D: N โ†’ b
View Answer
B

Q400: What type of language is generated by the grammar ฮฃ = {a, b} with productions S โ†’ a, S โ†’ b, S โ†’ ฮ›?
  • A: Finite strings of aโ€™s and bโ€™s
  • B: Infinite strings of aโ€™s
  • C: Only one a and one b
  • D: Only empty string
View Answer
A

Test Your Knowledge

Take a timed quiz on Theory of Automata

๐Ÿš€ Start Quiz Now