Compiler Design Week 11 Nptel Assignment Answers
Are you looking for NPTEL Compiler Design Week 11 Nptel Assignment Answers ? You’ve come to the right place! Access the most accurate answers at Progiez.
Table of Contents

Compiler Design Week 11 Nptel Assignment Answers (Jan-Apr 2025)
Course Link: Click Here
1. For the rule S → L := E, if L is a single variable, L.place is equal to
a) Null
b) Some value
c) Constant
d) None of the other options
2. For Boolean variable B, B.truelist contains
a) List of locations at which B is true
b) List of locations to jump to if B is true
c) List of locations at which B is true and the locations to branch to
d) None of the other options
3. When generating code for the Boolean expression “(x y) AND (p q)”, which locations are left for back patching?
a) Falselist of x y
b) Falselist of x y and falselist of p q
c) Falselist of x y, falselist of p q, truelist of p q
d) Truelist of x y, falselist of x y, truelist of p q, falselist of p q
4. In three-address code, arrays are
a) Not supported
b) One-dimensional
c) More than one-dimensional
d) Supported via pointers
5. For three-address code generation of “B1 or M B2”, M.quad is used to backpatch
a) B1.truelist
b) B1.falselist
c) B2.truelist
d) B2.falselist
6. For the rule B → B1 and B2, the operation “B1.false = B.false” requires two passes as
a) B1.false is not known
b) B.false is not known
c) Both B1.false and B.false are unknown
d) None of the other options
7. In the rule AND → N C2, the non-terminal N is used to remember the start address of:
a) C1
b) C2
c) Both C1 and C2
d) None of the other options
Compiler Design Week 11 Nptel Assignment Answers
8. In the rule S → if B then M S N else M S, N is used to generate a jump after
a) then-part
b) else-part
c) both then- and else-part
d) None of the other options
9. In the rule S → if B then M S1, M holds the start address for
a) then-part
b) else-part
c) both then- and else-part
d) None of the other options
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
11. In three-address code (TAC), accessing an array element typically requires:
a) Direct assignment without indexing
b) Computing an address using the base address and an offset
c) Using only registers without memory references
d) None of the other options
12. In the rule S → while M1 B do M2 S1, the non-terminal M2 is used to remember the start address of:
a) B
b) M1
c) Both B and M1
d) None of the other options
13. For a Boolean expression B, the attribute B.falselist contains:
a) List of locations where B evaluates to false
b) List of locations to jump to if B is false
c) List of locations where B is false and the locations to branch to
d) None of the other options
Compiler Design Week 11 Nptel Assignment Answers (Jan-Apr 2025)
For answers to others Nptel courses, please refer to this link: NPTEL Assignment