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

Compilers Multiple Choice Questions & Answers (MCQs) on “Implementation of the Translation Specified by Syntax-Directed Definitions”.

1. Which is not true about syntax and semantic parts of a computer language?
a) Semantics is checked mechanically by a computer
b) Semantics is the responsibility of the programmer
c) All of the mentioned
d) None of the mentioned

Answer: d
Clarification: Both in terms of semantics is not true.

2. Which of the following statement is true?
a) SLR powerful than LALR
b) LALR powerful than Canonical LR parser
c) Canonical LR powerful than LALR parser
d) The parsers SLR= Canonical LR=LALR

Answer: c
Clarification: LR > LALR > SLR In terms of the parser.

3. Which of the following features cannot be captured by CFG?
a) Syntax of if-then-else statements
b) Syntax of recursive procedures
c) A variable is declared before its use
d) Matching nested parenthesis

Answer: d
Clarification: It is because, it is equivalent to recognizing us, where the first w is the declaration and the second is its use, we are not a CFG.

4. In which of the following no information hiding is done?
a) Compile prig 1, prig 2
b) Run test, prog
c) Load R1, A
d) 001001000010101

Answer: d
Clarification: The entire binary symbol gives information.

5. The identification of common sub-expression and replacement of run-time computations by compile-time computations is _____________
a) Local optimization
b) Loop optimization
c) Constant folding
d) Data flow analysis

Answer: c
Clarification: Constant folding is the process of recognizing and evaluating constant expressions at compile time rather than computing them at runtime. Terms in constant expressions are typically simple literals they may also be variables whose values are assigned at compile time.

6. The graph that shows basic blocks and their successor relationship is called ____________
a) Dag
b) Flow Graph
c) Control Graph
d) Hamilton Graph

Answer: b
Clarification: Flow graph shows the basic blocks.

7. The specific task storage manager performs ____________
a) Allocation/ deal location of programs
b) Protection of storage area assigned to the program
c) Allocation/ deal location of programs & protection of storage area assigned to the program
d) None of the mentioned

Answer: c
Clarification: Its basic function is that of the task storage manager.

8. When a computer is rebooted, a special type of loader is executed called?
a) Compile and GO ” loader
b) Boot loader
c) Bootstrap Loader
d) Relating Loader

Answer: c
Clarification: A boot loader, is a small program that places the operating system (OS) of a computer into memory.

9. What is the disadvantage of ” Compile and GO ” loading scheme?
a) Memory is wasted because the case occupied by the assembler is unavailable to the object program
b) Necessary to translate the users program
c) It is very difficult to handle multiple segments, even when the source programs are in different languages and to produce orderly modular programs
d) All of the mentioned

Answer: d
Clarification: In computer programming, a compile and go system, compile, load, and go system, assemble and go system, or load and go system[1][2][3] is a programming language processor in which the compilation, assembly, or link steps are not separated from program execution.

10. What is the function of the storage assignment?
a) Assign storage to all variables referenced in the source program
b) Assign storage to all temporary locations that are necessary for intermediate results
c) Assign storage to literals, and to ensure that the storage is allocated and appropriate locations are initialized
d) All of the mentioned

Answer: d
Clarification: The storage assignment performs the above mentioned tasks.

Leave a Reply

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