# include <iostream.h>
int m =10; // Global Declaration. 'm' is global variable.
int main( )
{ int m = 20 //'m' declared, local to main
{
int k = m ;
int m = 30 ; //'m' declared again local to main
cout << " We are in inner Block \n ";
cout << " k = " << k << " \n";
cout << " m = " << m << " \n";
cout << " :: m = " << :: m<< " \n";
}
cout << " We are in Outer Block \n ";
cout << " m = " << m << " \n";
cout << " :: m = " << :: m<< " \n";
return 0;
} //end scope of main( )
0 comments:
Post a Comment