Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2018 | Question 51
  • Last Updated : 04 Jul, 2018

Consider the following C++ program’

int a (int m)
{return ++m;}
int b(int&m)
{return ++m;}
int c(char &m)
{return ++m;} 

void main 0
{
      int p = 0, q = 0, r = 0; 
      p += a(b(p));
      q += b(a(q));
      r += a(c(r));
      cout<

Assuming the required header files are already included, the above program:
(A) results in compilation error
(B) print 123
(C) print 111
(D) print 322


Answer: (A)

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Recommended Articles
Page :