Regular Languages and Context-Free Grammars MCQs

30 min Score: 0 Attempted: 0/30 Subscribe
1. Which of the following is a regular language?





2. Which automaton recognizes regular languages?





3. Which of the following operations always produces a regular language?





4. What is a deterministic finite automaton (DFA)?





5. What does a context-free grammar (CFG) generate?





6. Which of the following is an example of a context-free language?





7. Which of the following is a terminal in a CFG?





8. In CFG, what is the start symbol?





9. What is the Chomsky hierarchy level of regular languages?





10. What is the Chomsky hierarchy level of context-free languages?





11. Which operation may result in a non-regular language even if applied to regular languages?





12. Which of the following is true about regular expressions?





13. Which of the following is a production in CFG?





14. Which of the following languages is not regular?





15. How can a DFA be converted to a regular expression?





16. Which method is used to prove a language is not regular?





17. Which normal form is used for CFG simplification?





18. What is the main difference between regular languages and context-free languages?





19. What is the purpose of the Kleene star in regular expressions?





20. Which of the following is true about linear grammars?





21. Which type of CFG rule is allowed in Greibach Normal Form?





22. What does the pumping lemma for regular languages prove?





23. Which of the following is a context-free grammar rule?





24. Which language can be represented by both a regular expression and a DFA?





25. What is the closure property of regular languages?





26. Which tool can convert CFG to PDA?





27. Which of the following is not a context-free language?





28. What is the start symbol in CFG used for?





29. How can CFGs be used in compilers?





30. What is the main limitation of regular languages compared to CFLs?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials