NPTEL Compiler Design Week 9 Assignment Answers 2025

NPTEL Compiler Design Week 9 Assignment Answers 2025

1. Self-organizing list-based symbol tables improve performance primarily due to:

a) Locality of reference in the input program
b) Locality of reference in the compiler’s symbol access patterns
c) Both (a) and (b)
d) None of the above

Answer :- For Answers Click Here 

2. Most frequent operation on a symbol table is

a) Insert
b) Delete
c) Modify
d) Lookup

Answer :- 

3. Motivation behind using self-organizing list for symbol table is

a) Ease of implementation
b) Program locality
c) Insertion of symbols
d) None of the other options

Answer :- 

4. To minimize access time, symbol table should be organized as

a) Linear table
b) Tree
c) Hash table
d) Circular list

Answer :- 

5. Activation record stores

a) Parameters
b) Local variables
c) Parameters and local variables
d) Parameters, local variables and code for procedures

Answer :- 

6. Which of the following phases of compiler does NOT use symbol table?

a) Semantic analysis
b) Code generation
c) Code optimization
d) None of the given options

Answer :- For Answers Click Here 

7. If two types have same name they can be

a) Name equivalent
b) Structurally equivalent
c) Both name and structurally equivalent
d) May not be name equivalent

Answer :- 

8. Which type of compiler typically benefits from using a separate symbol table for each scope?

a) Single-pass compilers
b) Multi-pass compilers
c) Both single and multi-pass compiler
d) None of the given option

Answer :- 

9. Which of the following is NOT likely to be kept in a symbol table?

a) Name
b) Location
c) Scope
d) None of the other options

Answer :- 

10. Which of the following is NOT likely to be kept in a symbol table?

a) Name
b) Location
c) Scope
d) None of the other options

Answer :- 

11. What is the primary purpose of a symbol table in a compiler?

a) To store machine code instructions
b) To optimize runtime performance
c) To store and retrieve identifier-related information efficiently
d) To generate intermediate code

Answer :- 

12. Which of the following data structures is best suited for managing scope information in a symbol table?

a) Stack
b) Queue
c) Linked List
d) Heap

Answer :- 

13. Which optimization technique benefits the most from information stored in a symbol table?

a) Constant propagation
b) Loop unrolling
c) Dead code eliminatior
d) Instruction pipelining

Answer :- For Answers Click Here 
Scroll to Top