Answer to Question #57147 in C++ for priyam

Question #57147
Find the output of the following program...please explain the output in detail....

void Position(int &C1, int C2 = 3)
{
C1 += 2;
C2 += 1;
}

int main()
{
int P1 = 20, P2 = 4;
Position(P1);
cout << P1 << ", " << P2 << endl;
Position(P2, P1);
cout << P1 << ", " << P2 << endl;
}
1
Expert's answer
2015-12-28T05:00:51-0500
22,4
6,23

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS