Question: 1 2 points ] Consider the following program: c Copy code program scopetest / / global variables int a; int b; int p = 0
points Consider the following program:
c
Copy code
program scopetest global variables int a; int b; int p ; procedure x int a; a ; b ; p ; procedure printvars printlna; printlnb; printlnp; procedure q int b; a ; b ; p ; printvars; Main Body is here: x; run procedure x a p; store p in a q; run procedure q End of Main Body
Show what the program would print out assuming the language uses:
A Static scope rules points
B Dynamic scope rules points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
