MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Procedure calls and returns are usually managed by a run time stack called the ____
A
control stack
B
return address
C
access link
D
control link
Explanation: 

Detailed explanation-1: -Control stack or runtime stack is used to keep track of the live procedure activations i.e the procedures whose execution have not been completed. A procedure name is pushed on to the stack when it is called (activation begins) and it is popped when it returns (activation ends).

Detailed explanation-2: -Whenever a procedure is executed, its activation record is stored on the stack, also known as control stack.

Detailed explanation-3: -The information which required during an execution of a procedure is kept in a block of storage called an activation record. The activation record includes storage for names local to the procedure. We can describe address in the target code using the following ways: Static allocation.

Detailed explanation-4: -Explanation: In pass by name mechanism, the name of the procedure being called is replaced by its actual body.

There is 1 question to complete.