Question: Multiple Choice : QUESTION 8 Which of the following parameter passing method(s) is(are) used in Java? a.by value b. by reference c. by result d.

Multiple Choice :

QUESTION 8

Which of the following parameter passing method(s) is(are) used in Java?

a.by value

b.

by reference

c.

by result

d.

by value-result

Question 9:

Consider the following functions, with a fictitious keyword by-result, so the parameter c in function plus is passed by-result. When we call f(), what will be the value of z in the activation record of f?

void plus(int a, int b, by-result int c) { c = a+b; } void f() { int x = 3; int y = 4; int z; plus(x, y, z); }

a.

Unknown

b.

4

c.

7

d.

3

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 Databases Questions!