What is the output?

Procedure P(x,y,z)
{
y=y+1;
z=z+x;
}
main()
{
a=2;b=3;
P(a+b,a,a);
print(a);
}

1) call by value - 2
2) call by reference -8
3) call by copy/restore - ???

Can you please verify the ans and tell me how to evaluate the copy/restore
Thanks

Comments

Sign In or Register to comment.