Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2018 | Question 51

Improve Article
Save Article
Like Article
  • Difficulty Level : Basic
  • Last Updated : 04 Jul, 2018
Improve Article
Save Article
Like Article

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
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!