Compiler Design Multiple Choice Questions and Answers Pdf
Question: 1
Synthesized attribute can be easily simulated by a
(A) LR grammar
(B) LL grammar
(C) Ambiguous grammar
(D) None of these
Ans: A
LR grammar
Question: 2
The top-down parsing method is also called
(A) Operator precedence parsing
(B) Recursive descent parsing
(C) Shift reduce parsing
(D) None of these
Ans: B
Recursive descent parsing
Question: 3
Which of the following techniques is used to replace run-time
computations by compile time computations?
(A) Constant folding
(B) Code hoisting
(C) Pee phole optimization
(D) Invariant computation
Ans: A
Constant folding
Question: 4
The most general phase structured grammar
(A) Context sensitive
(B) Context free
(C) Regular
(D) None of these
Ans: A
Context sensitive
Question: 5
Which of the following class of statement usually produces no
executable code when compiled?
(A) Assignment statement
(B) Structural statements
(C) Input and output statements
(D) Declaration
Ans: B
Structural statements