Compiler Design | Questions and Answers


Compiler Design | Mock Test

Question 1
Finite automata can be used to count the number of symbols read.
Select one:
a. True
b. False

Feedback
The correct answer is ‘False’.
Question 2
In regular expression notation * represents one or more occurrence of the preceding symbol.
Select one:
a. True
b. False
Feedback
The correct answer is ‘False’.
Question 3
NDFA can be converted to DFA using subset construction method
Select one:
a. True
b. False
Feedback
The correct answer is ‘True’.
Question 4
Shift reduce parsing is a type of Top down design.
Select one:
a. True
b. False
Feedback
The correct answer is ‘False’.
Question 5
The grammar E –> E+E | E*E | a
Select one:
A. Ambiguous
B. Unambiguous
C. Depends on the given sentence
D. None of the above
Feedback
The correct answer is: Ambiguous
Question 6
Lexical Analyzer is the only phase which reads the complete source program.
Select one:
a. True
b. False
Feedback
The correct answer is ‘True’.
Question 7
Regular expression(0+1)* recognises set of all strings over {0,1}
Select one:
a. True
b. False
Feedback
The correct answer is ‘True’.
Question 8
LEX is a:
Select one:
A.
Token generator
B.
A parser generator
C.
Code generator
D.
None of the above
Feedback
The correct answer is:
Token generator
Question 9
Two finite state machines are said to be equivalent if they
Select one:
a. Have same number of states
b. Have the same number of states and edges
c. Recognize the same language
d. Have same number of edges
Feedback
The correct answer is: Recognize the same language
Question 10
A bottom up parser generates
Select one:
a. Right most derivation
b. Right most derivation in reverse
c. Left most derivation in reverse
d. Left most derivation
Feedback
The correct answer is: Right most derivation in reverse

Have any Question or Comment?

Leave a Reply

Exciting Offers

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 90 other subscribers

Exciting Offers

Exciting Offers

Exciting Offers

Close
%d bloggers like this: