Answer to Question #57103 in C++ for priyam
Question #57103
Write the output of the following C++ program code
void Location(int &X,int Y=4)
{
Y+=2;
X+=Y;
}
void main()
{
int PX=10,PY=2;
Location(PY);
cout<<PX<<”,”≪PY<<endl;
Location(PX,PY);
cout<<PX<<”,”≪PY<<endl;
}
void Location(int &X,int Y=4)
{
Y+=2;
X+=Y;
}
void main()
{
int PX=10,PY=2;
Location(PY);
cout<<PX<<”,”≪PY<<endl;
Location(PX,PY);
cout<<PX<<”,”≪PY<<endl;
}
Expert's answer
10,8
20,8
20,8
Need a fast expert's response?
Submit orderand get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment