subject

This code fragment uses arrays in java. the first line declares and allocates an array of two integers. the next two lines initialize it. (java arrays are indexed starting from 0.)

int[] a = new int[2];

a[0] = 0; a[1] = 2;

f(a[0], a[a[0]});

function f is defined as:

void f(int x, int y) {

x=1;

y=3;

}

for each of the following parameter-passing methods, say what the final values in the array a would be, after the call to f. (there may be more than one correct answer)

a. by value.

b. by reference.

c. by value-result.

d. by macro expansion.

e. by name.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
In simple terms, how would you define a protocol?
Answers: 2
question
Computers and Technology, 25.06.2019 03:30
All nate specialties are offered at two levels, a. journeyman and master. b. installation and service. c. apprentice and journeyman. d. heating and air conditioning.
Answers: 1
You know the right answer?
This code fragment uses arrays in java. the first line declares and allocates an array of two intege...
Questions
question
Mathematics, 03.01.2020 06:31
question
Mathematics, 03.01.2020 06:31
question
Mathematics, 03.01.2020 06:31
question
English, 03.01.2020 06:31
Questions on the website: 13722367