Question: 1. The output of this program assuming static scoping is: 2. The output of this program assuming dynamic scoping is: #include int i; void foo

1. The output of this program assuming static scoping is:

2. The output of this program assuming dynamic scoping is:

#include int i; void foo () { } printf ( 

#include int i; void foo () { } printf ("%d ", i); int main() { i = 0; foo (); { } i int i = 42; { } { } i + 11; foo (); return 0; int i = = 2; foo(); i = 100; i=i+21; foo ();

Step by Step Solution

3.41 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 Assuming static scoping the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!