Question: I Static and Dynamic Scopes. Consider the following program written in the C syntax int a, c,x, y, z; void print (int c) if (c

I Static and Dynamic Scopes. Consider the following program written in the C syntax int a, c,x, y, z; void print (int c) if (c == 0) printf("g: %d, %d, %d ", a, x, y, z); else printf ("main: %d, %d, %d ", a, x, y, z); int f(int x, int y) int a, b; a = 1; b 2; c = 3; x = g(10); int yi y g (x) ; printf ("f1: /point 1 */ /point 2 */ %d, %d, %d ", a, x, y, z); z = g(1); printf("f2: return x * %d, a -Y /* point 3/ /*point 4 %d, %d ", b, x, y, z); int g(int a) /*point 5*/ print (0); return (x + y- z) * a; int main ) int c = 2; a = 4; x=3 y = 12; z f(x, y); z = g (a) ; printf ("1 "); return 0 /*point 6/ /point 7/ What is the output of this program? You should show the output of every printf) on a separate line. You do not have to show your work, but if your answer for some lines are not correct, you will not get partial credit for those line if you do not show your work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
