我有一个练习题让我在即将到来的认证考试中遇到了困难。无论如何,请提供帮助!我想我了解如何获得答案的按值传递部分,但对这个问题的按引用传递部分没有任何想法。
procedure calc ( pass-by-value int w,
pass-by-value int x,
pass-by-reference int y,
pass-by-reference z)
w <-- w + 1
x <-- x * 2
y <-- y + 3
z <-- z * 4
end procedure
下面代码片段末尾的 a 和 b 的值是多少?
int a <-- 5
int b <-- 6
calc (a, a, b, b)