Explore topic-wise MCQs in Compilers.

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 production of the form no terminal → Λ is said to be null production?#

A. False
B. True
Answer» C.
2.

If R is regular language and Q is any language (regular/ non regular), then Pref (Q in R) is _____________

A. Non-regular
B. Equal
C. Infinite
D. Regular
Answer» E.
3.

String generated by

A.
B.
Answer» B.
4.

Which of the following is NOT the set of regular expression R = (ab + abb)* bbab

A. ababbbbab
B. abbbab
C. ababbabbbab
D. abababab
Answer» B. abbbab
5.

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
6.

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
7.

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