MCQOPTIONS
Saved Bookmarks
This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your Compilers knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
THE_GRAMMAR_G:_S_‚ÄÖ√Ñ√∂‚ÀÖ√∫‚Àւ†_SS_|_A_|_B_IS_AMBIGUOUS._CHECK_ALL_AND_ONLY_THE_STRINGS_THAT_HAVE_EXACTLY_TWO_LEFTMOST_DERIVATIONS_IN_G?$# |
| A. | bbb |
| B. | ab |
| C. | All of the mentioned |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 2. |
For_the_following_grammar:_S_‚Üí_A_|_B_|_2_A_‚Üí_C0_|_D_B_‚Üí_C1_|_E_C_‚Üí_D_|_E_|_3_D_‚Üí_E0_|_S_E_‚Üí_D1_|_S_Identify_all_the_unit_pairs$# |
| A. | D,C |
| B. | A,B |
| C. | B,C |
| D. | A,C |
| Answer» B. A,B | |
| 3. |
Here is a context-free grammar G: S ‚Üí AB A ‚Üí 0A1 | 2 B ‚Üí 1B | 3A which of the following strings are in L (G)?$ |
| A. | 021300211 |
| B. | 022111300211 |
| C. | None of the mentioned |
| D. | Both of the mentioned |
| Answer» E. | |
| 4. |
If is a language, and is a symbol, then, the quotient of and, is the set of strings such that is in: is in. Suppose is regular, which of the following statements is true? |
| A. | L/a is always a regular language |
| B. | L/a is not a regular language |
| C. | Both of the mentioned |
| D. | None of the mentioned |
| Answer» B. L/a is not a regular language | |
| 5. |
Which grammar is not regular |
| A. | 0^n |
| B. | 0^n 1^n n |
| C. | 0^m 0^n n |
| D. | 0^n 0^n n |
| Answer» B. 0^n 1^n n | |
| 6. |
Which of the following strings is NOT in the Kleene star of the language {011, 10, 110}? |
| A. | 01 |
| B. | 10 |
| C. | 110 |
| D. | 10011101 |
| Answer» E. | |
| 7. |
Find the pair of regular expressions that are equivalent |
| A. | (0+1)* and (0*+1*)* |
| B. | (0+1)* and (0+1*)* |
| C. | (0+10)* and (0*+10)* |
| D. | All of the mentioned |
| Answer» E. | |