A stack is used to pass parameters to procedures in a procedure call. (a) If a…

PYQ GATE 1993

A stack is used to pass parameters to procedures in a procedure call.

(a) If a procedure P has two parameters as described in procedure definition:

procedure P (var x : integer; y : integer);

and if P is called by ; P(a,b)

State precisely in a sentence what is pushed on stack for parameters a and b.

(b) In the generated code for the body of procedure P, how will the addressing of formal parameters x and y differ?

Sign up free to check your answer

Sign up free

Explore the full course: Compiler Design

Loading lesson…