Question: Consider the following pseudocode: int x = 1 , y = 3 , z = 5 ; void foo ( int a , int b
Consider the following pseudocode:
int x y z ;
void foo int a int b int c
x x b c ;
c b a ;
z x y ;
a a ;
y c x b ;
printf d d d n a b c ;
int main
foo ;
printf d d d n x y z ;
What will the code print when we call the function foo with the following parameters? If
necessary, assume that output arguments are copied back to parameters in the lefttoright
order. Please note the function foo is being called with different parameters at each of the
given questions below.
fooxxy where all parameters are passed by value
fooxzy where all parameters are passed by reference
foozyx where all parameters are passed by valueresult
fooxyy where all parameters are passed by reference
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
