This set of MCQ(multiple choice questions) focuses on the Compiler Design NPTEL 2022 Week 9 Assignment Solutions.
Course layout
Answers COMING SOON! Kindly Wait!
Week 1:Â Assignment answers
Week 2: Assignment answers
Week 3: Assignment answers
Week 4: Assignment answers
Week 5: Assignment answers
Week 6: Assignment answers
Week 7: Assignment answers
Week 8: Assignment answers
Week 9: Assignment answers
Week 10: Assignment answers
Week 11: Assignment answers
Week 12: Assignment answers
NOTE: You can check your answer immediately by clicking show answer button. This set of “Compiler Design NPTEL 2022 Week 9 Assignment Solution” contains 10 questions.
Now, start attempting the quiz.
Compiler Design NPTEL 2022 Week 9 Assignment Solutions
Q1. A desirable property of hash function for symbol table organization is
a) Depend on name of the symbol
b) Quickly computable
c) Avoid clustering for similar names
d) All of the other options
Answer: d) All of the other options
Q2. Access time of the symbol table will be logarithmic if organized as
a) Linear list
b) Tree
c) Hash table
d) None of the given options
Answer: b) Tree
Q3. Symbol table could be used for
a) Checking type compatibility
b) Suppressing duplication of error messages
c) Storage allocation
d) All of the other options
Answer: d) All of the other options
Q4. 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
Answer: a) Locality of input program
Q5. 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: d) None of the other options
Q6. Most frequent operation on a symbol table is
a) Insert
b) Delete
c) Modify
d) Lookup
Answer: d) Lookup
Q7. 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: d) None of the given options
Q8. 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
Answer: a) Single-pass compilers
Q9. 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: a) Name equivalent
Q10. To minimize access time, symbol table should be organized as
a) Linear table
b) Tree
c) Hash Table
d) Circular list
Answer: c) Hash Table
Q11. Symbol table data is filled by
a) Lexical analyzer
b) Parser
c) Both lexical analyzer and parser
d) Neither lexical analyzer nor parser
Answer: c) Both lexical analyzer and parser
Q12. Activation record stores
a) Parameters
b) Local variables
c) Parameters and local variables
d) Parameters, local variables and code for procedures
Answer: c) Parameters and local variables
>> Next- Compiler Design Week 10 Assignment Solutions
DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.
For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.