void main ( ) { int y=1; void C( ) { void D( ) { int y=4; // stop here } D( ); } void A(int f) { int z=2; void B( ) { int x=3; A(x-y-z); } if (f) { B( ); } else { C( ); } } A(y); } Things to show: - activation stack at 'stop here' - scope of global y using static scoping rules - referencing environment at 'stop here' - using static scoping rules - using dynamic scoping rules