250+ TOP MCQs on Implementation of the Translation Specified by Syntax-Directed Definitions

Compilers Question Bank on “Implementation of the Translation Specified by Syntax – Directed Definitions and Translations”.

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

Answer: a
Clarification: 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.

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

Answer: c
Clarification: A relocatable 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

Answer: c
Clarification: 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

Answer: a
Clarification: It displays a part of the data.

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

Answer: b
Clarification: 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

Answer: b
Clarification: 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

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

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

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

9. 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

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

Leave a Reply

Your email address will not be published. Required fields are marked *