Machine-translated by Google. Questions are authored in English.
Top

Discussion

Procedure activation record must contain :

(i) Space for arguments
(ii) Space for local data and local temporaries
(iii) Space for global data

  • A.(ii) only
  • B.(i) and (iii) only
  • C.(ii) and (iii) only
  • D.(i) and (ii) only

Answer: D

The activation record must contain (i) and (ii), so the answer is (i) and (ii) only.

An activation record (stack frame) is created for each call of a procedure. It holds the actual parameters (arguments), the returned value, the control link and access link, the saved machine status such as the return address, and space for local data and temporaries.

Global data is not stored there: it lives in the static data area, allocated once for the whole program and shared by all procedures. Options that include (iii) are therefore wrong, and '(ii) only' leaves out the arguments.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.