Question: a) What is the ouput for static scoping? b) What is the output for dynamic scoping? Please show the work, thank you. Consider the following

a) What is the ouput for static scoping?
b) What is the output for dynamic scoping?
Please show the work, thank you.
Consider the following program (all variables are initially 0) int a, b, c; int g) /decl 1 / return b; /* point 1 / int f(int x, int y) /decl 2 / /decl 3 / int b; b4: a=b+1; /decl 4 / int a, b; a 4: b2: c=a+b; /* point 2 / /* point 3 / return z: void main ) int a, C: /decl 5 / bf (a, c); printf ("%d %d %d ", a, b, c)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
