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

  • Hope you don't mind
    Is that a kind of homework or what?, try to analyze and use your logical thinking.
Sign In or Register to comment.