Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Paragraph Styles 1. proc mann int w, x. z proc A: proc B int x, z x2; call C; pr

ID: 3746455 • Letter: P

Question

Paragraph Styles 1. proc mann int w, x. z proc A: proc B int x, z x2; call C; print x; (end B) proc C int w, a, Z :-4; x :-42 := 7; call D: print w. x; } (end C) x3z int x, b; proc E: 5; call B; print x: (end A) proc D int X: 13; call F; print x: ) (end E) proc F: proc G print z; x 7; (end G print x; call G: x:-8: (end F ix-6; w := 19: call E: print x; } (endD) z := 9; call A: br-12; x:-1; print w, x, z; } (end main) (a) What is the program output assuming static scoping rules are employed? (b) What is the corresponding output when dynamic scoping rules are employed? (c) List the procedures that proc G can call (assuming static scoping). (d) Specify the referencing environment (variables) of proc E (assuming static scoping (e) Specify the referencing environment (variables) of proc E (assuming dynamic scoping)

Explanation / Answer

a)infinite values b)infinite values    c)A,B,C,D,E,F,G d)x    e)b,w,x,z