Consider the following C++ program
int a (int m)
{ return ++m; }
int b(int&m)
{ return ++m;}
intc(char &m)
{ return ++m; }
void main ()
{
int p = 0, q = 0,r = 0;
p += a(b(p)) ;
q += b(a(q));
r += a(c(r)) ;
cout<< p << q << r;
}
Assuming the required header files are already included, the above program
Create a FREE account and get: