Answer to Question #57147 in C++ for priyam
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
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment