Cat-2 QB
Cat-2 QB
compiled?
1. a) Declaration b) Assignment Statements c) Input and Output statements d) Control
statements
The graph that shows basic blocks and their successor relationship is called
4. a)DAG b)Hamilton Graph c)Control Graph d) Flow graph
In activation record, Which of the following stores the address of activation record of the
5. caller procedure?
a) Control Link b) Access Link c) Actual Parameters d) Temporaries
Multiplication of a positive integer by a power of two can be replaced by left shift, which
executes faster on most machines,is an example of?
9. a) Strength Reduction b) Peephole optimization c) Loop unwinding d) Constant
folding
Consider a program P that consists of two source modules M1 and M2 contained in two
different files. If M1 contains a reference to a function defined in M2, the reference will be
10. resolved at
a) Edit-time b) Link-time c) Compile-time d) Load-time
Specify the one which is associating the attributes with the grammar symbols.
14.
a)rotation b)translation c)transformation d)evolving
The graph that shows the basic blocks and their successor relationship is called
17. (A) Hamiltonian graph (B) Control graph (C) Flow graph (D) DAG
From anyone in the loop to any other, there is a path of length one or more is called.
An optimizing compiler
19. (A) Is optimized to occupy less space (B) Optimized the code (C) Is optimized to take
less time for execution (D) Less Compilation
PART-B
1. Give a brief note on Inherited Attributes with an example.
State the different issues in the design of code generation.
2.
3. What is backpatching?
4. Define “Next-Use” information.
5. Write SDT for Arithmetic and Boolean expressions
6.
Construct the Annotated Parse tree using Synthesized attribute for 4*5+6 and Inherited
attribute for int a,b,c.
PART-C
Construct basic blocks and flow graph for the following source code.
begin
prod := 0;
i := 1;
do begin
1. prod := prod + a[i] * b[i];
i := i+1;
end
while i < = 20
end