Program to illustrates External Storage Classes


#include<iostream.h>

int i ;               //External variable
void decre( );
void incre( ) ;

void main( )
{
    cout << "\n i = "<<i ;
    incre( );
    incre( );
    decre( );
    decre( );
}
void incre( )
{         
         i = i + 1;
         cout << "\n On incrementing i = " << i ;
}
void decre( )
{         
          i = i - 1;
          cout << "\n On decrementing i = " << i ;
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|