Compilers Questions and Answers – Elimination of Induction Variables – 2

«
»

This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Elimination of Induction Variables – 2”.

1. A non relocatable program is the one which
a) Cannot execute in any area of storage other than the one designated
b) Consists of a program and information for its relocation
c) None of the mentioned
d) All of the mentioned
View Answer

Answer: a
Explanation: A non reloadable program is one which cannot be made to execute in any area of storage other than the one designated for it at the time of its coding or translation.
advertisement

2. A relocatable program form is one which
a) Cannot execute in any area of storage other than the one designated
b) Consists of a program and information for its relocation
c) None of the mentioned
d) All of the mentioned
View Answer

Answer: c
Explanation: A reloadable program form is one which consists of a program and relevant information for its relocation. Using this information it is possible to relocate the program to execute from a storage area then the one designated for it at the time of its coding or translation.

3. A self-relocating program is one which
a) Cannot execute in any area of storage other than the one designated
b) consists of a program and information for its relocation
c) None of the mentioned
d) All of the mentioned
View Answer

Answer: c
Explanation: A self-relocating program is a program which can perform the relocation itself
•A table of information about address sensitive instruction in the program.
•Relocating logic that can perform the relocation of the address sensitive instructions.

4. Scissoring enables
a) A part of data to be displayed
b) Entire data to be displayed
c) Full data display on full screen
d) No data to be displayed
View Answer

Answer: a
Explanation: It displays a part of the data.
advertisement

5. Which of the following can be accessed by transfer vector approach of linking?
a) External data segments
b) External sub-routines
c) Data located in other procedure
d) All of the mentioned
View Answer

Answer: b
Explanation: External subroutines are routines that are created and maintained separately from the program that will be calling them.

6. Relocation bits used by relocating loader are specified by
a) Relocating loader itself
b) Linker
c) Assembler
d) Macro processor
View Answer

Answer: b
Explanation: A linker or link editor is a computer program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another object file.

7. Generation of intermediate code based on a abstract machine model is useful in compilers because
a) Implementation of lexical analysis and syntax analysis is made easier
b) Writing for intermediate code generation
c) Portability of the front end of the compiler
d) None of the mentioned
View Answer

Answer: a
Explanation: Intermediate code generator receives input from its predecessor phase, semantic analyzer, in the form of an annotated syntax tree.
advertisement

8. Which of the following module does not incorporate initialization of values changed by the module?
a) Non reusable module
b) Serially reusable module
c) Re-enterable module
d) All of the mentioned
View Answer

Answer: a
Explanation: Non reusable models can be used once for a purpose they can’t be modified and used again.

9. An intermediate code form is
a) Postfix Notation
b) Syntax Trees
c) Three address
d) All of the mentioned
View Answer

Answer: d
Explanation: All the specified options are type of intermediate code form.

10. The best way to compare the different implementations of symbol table is to compare the time required to
a) Add a new name
b) Make an enquiry
c) Add a new name and make an enquiry
d) All of the mentioned
View Answer

Answer: d
Explanation: These are the different implementations of the symbol table as mentioned above.
advertisement

Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn