MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Compilers knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
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 | |
| 2. |
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 | |
| 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. | 021300211 & 022111300211 |
| Answer» E. | |
| 4. |
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 | |
| 5. |
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. | |