Classical

Compiler Design - Runtime environments

26:  

To recover from an error, the operator precedence parser may

A.

insert symbols onto the stack and onto the input

B.

delete symbols from the stack

C.

delete symbols from the input

D.

all of these

 
 

Option: D

Explanation :


27:  

Reduction in strength means 

A.

replacing run-time computation by compile time computation

B.

replacing a costly operation by a relatively cheaper one

C.

Both (a) & (b)

D.

removing loop invariant computation

 
 

Option: C

Explanation :


28:  

Running time of a program depends on

A.

the way the registers and addressing modes are used

B.

the order in which computations are performed

C.

the usage of machine idioms

D.

all of these

 
 

Option: D

Explanation :


29:  

If control signals {a,b,c,d,e,f,g} for some micro instructions and their corresponding MCCS (Maximum Compatibility Classes) are
                                                   [ad f* g, abd, beg, b deg}
then to determine minimal MCC cover, we need to remove

A.

adfg

B.

afd

C.

bcg

D.

bdeg

 
 

Option: B

Explanation :


30:  

Assume that X and Y are non zero positive integers. What does the following Pascal program segment   do?

                                     while X  <  >  Y   do
                                      if     X  >  Y       then
                                      X :  =  X - Y
                                      else                    
                                      Y : = Y - X ;
                                      write (X);

A.

Computes LCM of two numbers

B.

Divides larger number by the smaller number

C.

Computes GCD of two numbers

D.

None of these

 
 

Option: C

Explanation :




Suggest an improvement