Compiler Design MCQ Questions & Answers

Compiler Design MCQ

Question 1
In X.YZ the . in between represents shift operation
Select one:
a. False
b. True

Feedback
The correct answer is: True

Question 2
FIRST of a terminal is always a terminal
Select one:
a. False
b. True
Feedback
The correct answer is: True

Question 3
LL parser is an example for Bottom – up parser design
Select one:
a. True
b. False
Feedback
The correct answer is: False

Question 4
Classes of languages accepted by NFA and its equivalent DFA are different
Select one:
a. False
b. True
Feedback
The correct answer is: False

Question 5
In XYZ. the . at the end represents reduce operation
Select one:
a. False
b. True
Feedback
The correct answer is: True

Question 6
Yet Another Compiler’s Compiler is a tool for
Select one:
a. code optimization
b. Intermediate code generation
c. Lexical analysis
d. Syntax analysis
Feedback
The correct answer is: Syntax analysis

Question 7
Push – Down Automata is used for parser designs
Select one:
a. False
b. True
Feedback
The correct answer is: True

Question 8
x = y + z is an example for three – address code
Select one:
a. True
b. False
Feedback
The correct answer is: True

Question 9
The first and last statements in a Basic block can be leaders
Select one:
a. True
b. False
Feedback
The correct answer is: False

Question 10
The statement followed by an unconditional jump is a leader
Select one:
a. False
b. True
Feedback
The correct answer is: False

Question 11
The run time environment represents recursive call as Activation Record
Select one:
a. True
b. False
Feedback
The correct answer is: True

Question 12
the statement followed by a conditional jump is a leader
Select one:
a. False
b. True
Feedback
The correct answer is: True

Question 13
LR parser is an example for Top – down design for parser
Select one:
a. False
b. True
Feedback
The correct answer is: False

Question 14
The linux command grep stands
Select one:
a. none of the above
b. global regular execute pattern
c. gedit row edit print
d. globally search a regular expression and print
Feedback
The correct answer is: globally search a regular expression and print

Question 15
Parsing is also Known as:
Select one:
a. Code generation
b. Syntax Analysis
c. Lexical Analysis
d. Semantic Analysis
Feedback
The correct answer is: Syntax Analysis

Question 16
FOLLOW set is computed for only non-terminals/variables
Select one:
a. False
b. True
Feedback
The correct answer is: True

Question 17
predictive parser can be
Select one:
a. Recursive and constructive
b. Non Recursive
c. Constructive
d. Recursive
Feedback
The correct answer is: Recursive

Question 18
Control Flow Graph uses stack based address format
Select one:
a. True
b. False
Feedback
The correct answer is: False

Question 19
In DAG form of the Abstract Syntax Tree the common sub-expressions are
eliminated
Select one:
a. False
b. True
Feedback
The correct answer is: True

Question 20
In a two pass assembler the object code generation is done during the ?
Select one:
a. None of these
b. Second pass
c. First pass
d. Zeroed Pass
Feedback
The correct answer is: Second pass