Page 1 of 1

b pts total) Consider the following program which is written in a pseudo-code for a block-structured language with neste

Posted: Sat May 14, 2022 4:50 pm
by answerhappygod
B Pts Total Consider The Following Program Which Is Written In A Pseudo Code For A Block Structured Language With Neste 1
B Pts Total Consider The Following Program Which Is Written In A Pseudo Code For A Block Structured Language With Neste 1 (33.37 KiB) Viewed 62 times
b pts total) Consider the following program which is written in a pseudo-code for a block-structured language with nested procedures where proci and proc2 are nested in main: program main() { int a - 6; int b = 2; procedure proc2(int z) { 2 - 2 + a; a - 2. b; ) procedure proci() { int a -4; b = a +b; proc2(b); ) proc1(); 7/ point where variable "a" or "b" is printed. ) Consider different scoping and parameter passing rules for the program above. Fill in the table with the values for variable a if the program was evaluated with static scoping and the values for variable b if the program was evaluated with dynamic scoping. The printing is done in the body of main after the call to procedure proci. By value: By reference: By value-result: Static scoping: a a a = Dynamic scoping: - b b =