MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Control link points to the
A
Current activation record
B
Parent activation record
C
Child activation record
D
None of the other options
Explanation: 

Detailed explanation-1: -Optional control link− It points to the activation record of the caller. Actual Parameter− It is used by the calling procedure to supply parameters to the called procedure. Return value− This field is used by the called procedure to return a value to the calling procedure.

Detailed explanation-2: -Control Link: It points to activation record of the caller. Access Link: It is used to refer to non-local data held in other activation records. Saved Machine Status: It holds the information about status of machine before the procedure is called.

Detailed explanation-3: -1) A control link from record A points to the previous record on the stack. 2) Points to activation record of calling procedure. 3) The chain of control links traces the dynamic execution of the program.

Detailed explanation-4: -An activation record contains all the necessary information required to call a procedure. An activation record may contain the following units (depending upon the source language used). Stores temporary and intermediate values of an expression. Stores local data of the called procedure.

Detailed explanation-5: -An activation tree is a tree structure that represents function calls made by a program during execution. When a function is called a new activation record is pushed to the stack and popped from the stack when the function returns.

There is 1 question to complete.