Compiler Design | Mock Test
Question 1
Finite automata can be used to count the number of symbols read.
Select one:
a. True
b. False
Question 2
In regular expression notation * represents one or more occurrence of the preceding symbol.
Select one:
a. True
b. False
Question 3
NDFA can be converted to DFA using subset construction method
Select one:
a. True
b. False
Question 4
Shift reduce parsing is a type of Top down design.
Select one:
a. True
b. 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
Question 6
Lexical Analyzer is the only phase which reads the complete source program.
Select one:
a. True
b. False
Question 7
Regular expression(0+1)* recognises set of all strings over {0,1}
Select one:
a. True
b. False
Question 8
LEX is a:
Select one:
A.
Token generator
B.
A parser generator
C.
Code generator
D.
None of the above
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
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