Question: Problem 1 : Parameter Passing Exercise [ 2 0 pts ] Consider the following pseudocode: 1 x = 1 , y = 3 , z
Problem : Parameter Passing Exercise pts
Consider the following pseudocode:
x y z
function foo a b :
x x b ;
z x y ;
a a z ;
y a x b ;
pts For each of the cases below, write down the values of x y and z after the
following calls to foo If necessary, assume that output arguments are copied back to
parameters in the lefttoright order.
a fooxy where all parameters are passed by value.
b fooxz where all parameters are passed by reference.
c fooyz where all parameters are passed by valueresult.
d foozz where all parameters are passed by reference.
pts Passedbyresult parameter passing scheme is not applicable for the above pro
gram justify this statement with proper example
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
