Classical

Compiler Design - Runtime environments

21:  

Given the following Pascal-like program segment 
Procedure A,
x, y : integer ;
Procedure B;
                 x, z : real ;
                           S1
end B;
Procedure C;
                  i : integer ;
                            S2
end C
end A;
The variables accessible in S1 and S2 are

A.

x of A, y, x of B and z in S1 and x of B, y and i in S2

B.

x of B, y and z in S1 and x of B, i and z in S2

C.

x of B, z and y in S1 and x of A, i and y in S2

D.

none of these

 
 

Option: C

Explanation :


22:  

 An intermediate code form is

A.

postfix notation

B.

syntax trees

C.

three address codes

D.

all of these

 
 

Option: D

Explanation :


23:  

Three address code invloves

A.

exactly 3 address

B.

at the most 3 address

C.

no unary operators

D.

none of these

 
 

Option: B

Explanation :


24:  

The best way to compare the different implementations of symbol table is to compare the time required to

A.

add a new name

B.

make an inquiry

C.

add a new name and make an inquiry

D.

all of these

 
 

Option: D

Explanation :


25:  

Advantage of panic mode of error recovery is that

A.

it is simple to implement

B.

it never gets into an infinite loop

C.

both (a) and (b)

D.

none of these

 
 

Option: C

Explanation :




Suggest an improvement