MCQOPTIONS
Saved Bookmarks
This section includes 6 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 production of the form no terminal is said to be null production. |
| A. | False |
| B. | True |
| Answer» C. | |
| 2. |
Consider the production of the grammar S->AA A->aa A->bb Describe the language specified by the production grammar. |
| A. | L = {aaaa,aabb,bbaa,bbbb} |
| B. | L = {abab,abaa,aaab,baaa} |
| C. | L = {aaab,baba,bbaa,bbbb} |
| D. | L = {aaaa,abab,bbaa,aaab} |
| Answer» B. L = {abab,abaa,aaab,baaa} | |
| 3. |
Which of the following is NOT the set of regular expression R = (ab + abb)* bbab? |
| A. | ababbbbab |
| B. | abbbab |
| C. | ababbabbbab |
| D. | abababab |
| Answer» E. | |
| 4. |
The regular expression with all strings of 0 s and 1 s with at least two consecutive 0 s is? |
| A. | 1 + (10)* |
| B. | (0+1)*00(0+1)* |
| C. | (0+1)*011 |
| D. | 0*1*2* |
| Answer» C. (0+1)*011 | |
| 5. |
The regular expression have all strings of 0 s and 1 s with no two consecutive 0 s is? |
| A. | (0+1) |
| B. | (0+1)* |
| C. | (0+ ) (1+10)* |
| D. | (0+1)* 011 |
| Answer» D. (0+1)* 011 | |
| 6. |
The RE in which any number of 0 s is followed by any number of 1 s followed by any number of 2 s is? |
| A. | (0+1+2)* |
| B. | 0*1*2* |
| C. | 0* + 1 + 2 |
| D. | (0+1)*2* |
| Answer» C. 0* + 1 + 2 | |