Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started