250+ TOP MCQs on Syntax-Directed Definitions and Translations

Compilers Multiple Choice Questions & Answers (MCQs) on “Syntax Directed Definition & Translations Questions and Answers – “.

1. The segment base is specified using the register named is?
a) ORG instructions
b) TITLE instruction
c) ASSUME instruction
d) SEGMENT instruction

Answer: a
Clarification: 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
c) Re-enter-able
d) None of the mentioned

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

Answer: a
Clarification: 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?
a) O(1)
b) O(long)
c) O(n)
d) O(long)

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

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

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

Answer: d
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.

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
d) Reductions

Answer: b
Clarification: 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?
a) Reallocation
b) Allocation
c) Linking
d) Loading

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

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

Leave a Reply

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