67% found this document useful (3 votes)
2K views

Assignment - 9 - Compiler Design

This document contains a 10 question multiple choice quiz about compiler design and symbol tables. The questions cover topics like: the most common operation on a symbol table is lookup; self-organizing lists show better performance due to program locality; hash tables are best for minimizing access time in symbol tables; activation records store parameters and local variables; and symbol table data is filled by both the lexical analyzer and parser.

Uploaded by

dheena thayalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
67% found this document useful (3 votes)
2K views

Assignment - 9 - Compiler Design

This document contains a 10 question multiple choice quiz about compiler design and symbol tables. The questions cover topics like: the most common operation on a symbol table is lookup; self-organizing lists show better performance due to program locality; hash tables are best for minimizing access time in symbol tables; activation records store parameters and local variables; and symbol table data is filled by both the lexical analyzer and parser.

Uploaded by

dheena thayalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

NPTEL Online Certification Courses Indian

Institute of Technology Kharagpur

Compiler Design
Assignment- Week 9
TYPE OF QUESTION:MCQ
Number ofquestions:10 Total mark: 10 X 1 = 10

1. Self-organizing list based symbol tables may show better performance due to

a) Locality of input program


b) Locality of compiler
c) Both locality of input program and compiler
d) None of the given options
Ans: a)

2. Most frequent operation on a symbol table is

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

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
Ans: b)

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

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

5. Activation record stores

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

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
And: d)

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
Ans: c)

8. One symbol table per scope is suited for

a) Single-pass compilers
b) Multi-pass compilers
c) Both single and multi-pass compilers
d) None of the given options
Ans: a)

9. Symbol table data is filled by

(A) Lexical analyzer


(B) Parser
(C) Both lexical analyzer and parser
(D) Neither lexical analyzer nor parser

Ans: c)

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
Ans: d)

END of Assignment

You might also like