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 ("%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 Assuming static scoping the ... View full answer
Get step-by-step solutions from verified subject matter experts
