Question: 2 . ( 1 0 pts . ) Given the following code: ` ` ` int z = 7 ; int k = 2 ;

2.(10 pts.) Given the following code:
```
int z =7;
int k =2;
public void f(int x, int y){
int k =8;
y = k;
}
z = y * k;
public static void main(String[] args){
f(z, k);
System.out.println(z);
}
System.out.println(k);
```
what would the output be if the parameters were passed using a. call by value?
b. call by reference?
c. call by value-result?
d. call by macro expansion?
2 . ( 1 0 pts . ) Given the following code: ` ` `

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!