b pts total) Consider the following program which is written in a pseudo-code for a block-structured language with neste
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
b pts total) Consider the following program which is written in a pseudo-code for a block-structured language with neste
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 =
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!