Compiler Design - Runtime environments

31:  

 A variant record in Pascal is defined by

                                        type varirec = record 
                                                          number : integer
                                                          case(varl, var2)of    
                                                          var 1 : (x, y : integer); 
                                                           var2 : (p.q. : real);
                                                           end;
                                                           end ;

Let an array of 100 records was declared on a machine which uses 4 bytes for an integer and 8 bytes for a real. How much space would the compiler have to reserve for the array ?

A.

2800

B.

2400

C.

2000

D.

1200

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



Related MCQ