Implementation of the Translation Specified by Syntax-Directed Definitions

Question 1
Marks : +2 | -2
Pass Ratio : 100%
What is the disadvantage of ” Compile and GO ” loading scheme?
Memory is wasted because the case occupied by the assembler is unavailable to the object program
Necessary to translate the users program
It is very difficult to handle multiple segments, even when the source programs are in different languages and to produce orderly modular programs
All of the mentioned
Explanation:
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.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
Which is not true about syntax and semantic parts of a computer language?
Semantics is checked mechanically by a computer
Semantics is the responsibility of the programmer
All of the mentioned
None of the mentioned
Explanation:
Both in terms of semantics is not true.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
In which of the following no information hiding is done?
Compile prig 1, prig 2
Run test, prog
Load R1, A
001001000010101
Explanation:
The entire binary symbol gives information.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
Which of the following statement is true?
SLR powerful than LALR
LALR powerful than Canonical LR parser
Canonical LR powerful than LALR parser
The parsers SLR= Canonical LR=LALR
Explanation:
LR > LALR > SLR In terms of the parser.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
The specific task storage manager performs ____________
Allocation/ deal location of programs
Protection of storage area assigned to the program
Allocation/ deal location of programs & protection of storage area assigned to the program
None of the mentioned
Explanation:
Its basic function is that of the task storage manager.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
What is the function of the storage assignment?
Assign storage to all variables referenced in the source program
Assign storage to all temporary locations that are necessary for intermediate results
Assign storage to literals, and to ensure that the storage is allocated and appropriate locations are initialized
All of the mentioned
Explanation:
The storage assignment performs the above mentioned tasks.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
Which of the following features cannot be captured by CFG?
Syntax of if-then-else statements
Syntax of recursive procedures
A variable is declared before its use
Matching nested parenthesis
Explanation:
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.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
The graph that shows basic blocks and their successor relationship is called ____________
Dag
Flow Graph
Control Graph
Hamilton Graph
Explanation:
Flow graph shows the basic blocks.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
The identification of common sub-expression and replacement of run-time computations by compile-time computations is _____________
Local optimization
Loop optimization
Constant folding
Data flow analysis
Explanation:
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.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
When a computer is rebooted, a special type of loader is executed called?
Compile and GO ” loader
Boot loader
Bootstrap Loader
Relating Loader
Explanation:
A boot loader, is a small program that places the operating system (OS) of a computer into memory.