# include <iostream.h>
int x =11; // Global Declaration. 'x' is global variable.
int main( )
{
int x = 22;
{ //begin scope of internal block
int x =33;
cout<<"In block inside main( ) : x = "<<x << endl ;
} //end scope of internal block
cout<<"In main( ) : x = "<<x <<endl;
cout<<"In main( ) : ::x = "<<::x <<endl;
return 0;
} //end scope of main( )
0 comments:
Post a Comment