Question 51

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:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

cracku

Boost your Prep!

Download App