int i = 1000;    // global scope, allocated in static space

void g()
{
   int i = 5;    // scope within g, automatic variable
}

void f()
{
   int i = 50;         // scope within f, automatic variable
   static int j = 500; // scope within f, allocated in static space

   g();
}


int main()
{
   int i = 5000;  // scope within main, automatic variable

   f();

   return 0;
}
