Example :-

Void Compute (int a , int &b)
{
A++;
B++ ;
cout<< "in the function"<<endl ;
cout<<A=<<A<<"&"<<"B"<<B<<endl ;
}

void main( )
{
int i=50, j-25 ;
cout<<"Before function call"<<endl;
cout<<"i="<<i<<"&"<<j<<endl ;
comput(i,j)
cout<<"After function call"<<endl ;
cout<<"i="<<i<<"&"<<"j="<<j<<endl ;
}

Designed By Blogger Templates | Templatelib & Distributed By Blogspot Templates