Welcome to the Context Free Grammars MCQs Page

Dive deep into the fascinating world of Context Free Grammars with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Context Free Grammars, a crucial aspect of Formal Languages and Automata Theory. In this section, you will encounter a diverse range of MCQs that cover various aspects of Context Free Grammars, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Formal Languages and Automata Theory.


Check out the MCQs below to embark on an enriching journey through Context Free Grammars. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Formal Languages and Automata Theory.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Context Free Grammars. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Context Free Grammars MCQs | Page 1 of 10

Answer: (b).union of 2 CFLs is context free
Consider the following two statements:

S1: { 0^2n |n >= l} is a regular language
S2: { 0^m 0^n 0^(m+n) l m >= 1 and n >= 2} is a regular language

Which of the following is true?
Answer: (c).Both S1 and S2 are correct
Let L denotes the language generated by the grammar S – OSO/00. Which of the following is true?
Answer: (b).L is regular but not O
Answer: (c).Context-free languages are closed under intersection
Which of the following strings is not generated by the following grammar?

S → SaSbS|ε
Answer: (d).aaabbb
The production Grammar is {S->aSbb,S->abb} is
Answer: (b).Type-2 grammar
A language L from a grammar G = { VN, Σ, P, S} is
Answer: (b).Set of symbols over Σ
Answer: (b).Set of strings over an alphabet
Given the language L = {ab, aa, baa}, which of the following strings are in L*?

1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
Answer: (c).1, 2 and 4
Answer: (c).L (A* B*)∩ B gives the set A
Page 1 of 10

Suggested Topics

Are you eager to expand your knowledge beyond Formal Languages and Automata Theory? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!