What are the final values of m and n if all parameters of


Consider the following c++ program
using namespace std;
void f(int x,int y,int z){
x=1;
z=x+y;
}
main()
{int m=2,n=1;
f(m,m,n);
}
what are the final values of m and n if all parameters of f(x,y,and z) are passed by
1)value result(valaues copied left-to-right) answer: m=2, n=3
2)value result (values copied right-left) answer : m=1, n=3
3) name answer m=1 n=2
i know answer but i dont get how they get the answers if you could explain?

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: What are the final values of m and n if all parameters of
Reference No:- TGS0646372

Expected delivery within 24 Hours