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 regular expression denote a language comprising all possible strings of even length over the alphabet (0,1) is? |
| A. | 1 + 0(1+0)* |
| B. | (0+1)(1+0)* |
| C. | (1+0) |
| D. | (00+0111+10)* |
| Answer» E. | |
| 2. |
The production Grammar is {S->aSbb, S->abb} is? |
| A. | type-3 grammar |
| B. | type-2 grammar |
| C. | type-1 grammar |
| D. | type-0 grammar |
| Answer» C. type-1 grammar | |
| 3. |
Give a production grammar for the language L = {x/x (a,b)*, the number of a s in x is multiple of 3}. |
| A. | {S->bS, S->b,S->aA, S->bA, A->aB, B->bB, B->aS, S->a} |
| B. | {S->aS,S->bA,A->bB,B->bBa,B->bB} |
| C. | {S->aaS,S->bbA,A->bB,B->ba} |
| D. | None of the mentioned |
| Answer» B. {S->aS,S->bA,A->bB,B->bBa,B->bB} | |
| 4. |
Which of the following String can be obtained by the language L = {ai b2i / i >=1}? |
| A. | aaabbbbbb |
| B. | aabbb |
| C. | abbabbba |
| D. | aaaabbbabb |
| Answer» B. aabbb | |
| 5. |
Let R1 and R2 be regular sets defined over alphabet then? |
| A. | R1 UNION R2 is regular |
| B. | R1 INTERSECTION R2 is regular |
| C. | INTERSECTION R2 IS NOT REGULAR |
| D. | R2* IS NOT REGULAR |
| Answer» B. R1 INTERSECTION R2 is regular | |
| 6. |
Give a production grammar that specified language L = {ai b2i >= 1}. |
| A. | {S->aSbb,S->abb} |
| B. | {S->aSb, S->b} |
| C. | {S->aA,S->b,A->b} |
| D. | None of the mentioned |
| Answer» B. {S->aSb, S->b} | |