This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Syntax Directed Definition & Translations Questions and Answers – Sanfoundry “.
1. The segment base is specified using the register named is?
a) ORG instructions
b) TITLE instruction
c) ASSUME instruction
d) SEGMENT instruction
Explanation: ORG segment base register is used to specify the register.
2. In what module multiple instances of execution will yield the same result even if one instance has not terminated before the next one has begun?
a) Non usable module
b) Serially usable
d) None of the mentioned
Explanation: Re enter-able module is the reason why the compiler is used in the first place.
3. Dividing a project into segments and smaller units in order to simplify design and programming efforts is called?
a) Modular approach
b) Top down approach
c) Bottom up approach
d) Left right approach
Explanation: Modular design, or “modularity in design”, is a design approach that subdivides a system into smaller parts called modules or skids that can be independently created and then used in different systems.
4. Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of n nodes?
Explanation: For skewed binary search tree on n nodes, the upper bound to insert a node is O (n).
5. Which of the following is true for machine language?
a) Continuous execution of program segments
b) Depicting flow of data in a system
c) A sequence of instructions which solves a problem
d) The language which interacts with the computer using only the binary digits 1 and 0
Explanation: Machine code or machine language is a set of instructions executed directly by a computer’s central processing unit (CPU). Each instruction performs a very specific task.
6. Software that measures, monitors, and controls events are ___________
a) System S/w
b) Real Time software
c) Scientific software
d) Business Software
Explanation: In computer science, real-time computing (RTC), or reactive computing describes hardware and software systems subject to a “real-time constraint”, for example operational deadlines from event to system response.
7. A linker is given object module for a set of programs that were compiled separately. What is not true about an object module?
a) Object code
b) Relocation bits
c) Names and locations of all external symbols denied in the object module
d) Absolute addresses of internal symbols
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.
8. The table created by lexical analysis to describe all literals used in the source program is?
a) Terminal table
b) Literal table
c) Identifier table
Explanation: In computer science, and specifically in compiler and assembler design, literal pool is a lookup table used to hold literals during assembly and execution.
9. Which loader function is accomplished by loader?
Explanation: Function of a loader.
10. What is Pass 2?
a) Assemble instruction and generate data
b) Perform processing of assembler
c) Write the object program
d) All of the mentioned
Explanation: A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times. Each pass takes the result of the previous pass as the input and creates an intermediate output.
Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.