// from  http://en.wikibooks.org/wiki/C%2B%2B_Programming/Scope/Examples
#include <iostream>
 
using namespace std;  /* outermost level of scope starts here */
 
int i=10;
 
int main(){           /* next level of scope starts here */
  cout << i << endl;
  int i;
  i = 5;
  cout << i << endl;
  {                   /* next level of scope starts here */
    cout << i << endl;
    int j,i;
    j = 1;
    i = 0;
    cout << i << endl;
 
    {                 /* innermost level of scope of this program starts here */
      cout << i << endl;
      int k, i;
      i = -1;
      j = 6;
      k = 2;
      cout << i << endl;
    }                 /* innermost level of scope of this program ends here */
 
  }                   /* next level of scope ends here */
 
  cout << i << endl;
  return 0;
}                     /* next and outermost levels of scope end here */

