// File: static1.C // // Static local variables #include void func1() { static int s=0 ; int a, b ; cout << "&s = " << &s << "\n" ; cout << "&a = " << &a << ", &b = " << &b << "\n" ; s++ ; cout << "s = " << s << "\n" ; } void func2() { int c, d ; cout << "&c = " << &c << ", &d = " << &d << "\n" ; func1() ; } main() { cout << "\nCalling func1()\n" ; func1() ; cout << "\nCalling func1()\n" ; func1() ; cout << "\nCalling func1()\n" ; func1() ; cout << "\nCalling func2()\n" ; func2() ; }