Assignment - 11 - Compiler Design
Assignment - 11 - Compiler Design
Compiler Design
Assignment- Week 11
TYPE OF QUESTION:MCQ
Number ofquestions:10 Total mark: 10 X 1 = 10
(A) Null
(B) Some value
(C) Constant
(D) None of the other options
Ans: A
3. When code is generated for "a < b and c > d", the locations left for backpatching are
(A) B1.truelist
(B) B1.falselist
(C) B2.truelist
(D) B2.falselist
Ans: B
6. For the rule B B1 and B2, the operation "B1.false = B.false" requires two passes as
7. In the rule B B1 or MB2, the nonterminal M is used to remember the start address of
(A) B
(B) B1
(C) Both B1 and B
(D) None of the other options
Ans: D
(A) then-part
(B) else-part
(C) both then- and else-part
(D) None of the other options
Ans: A
9. In the rule S if B then M S1, M holds the start address for
(A) S1
(B) S
(C) B
(D) None of the other options
Ans: A
10. For three address code generation of rule “S while M1 B do M2 S1”, B.falselist is
backpatched with
(A) M1.quad
(B) M2.quad
(C) Cannot be backpatched at this point
(D) None of the other options
Ans: C
END of Assignment