InterviewSolution
Saved Bookmarks
| 1. |
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)* 011I have been asked this question in an online quiz.My question comes from Regular Expression topic in chapter Compiler Introduction of Compiler |
|
Answer» CORRECT option is (c) (0+∈) (1+10)* For explanation: From the former bracket we choose 0 or epsilon. Then from the latter part 1 or 10 which can be followed by 1 or 10. |
|