1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
oksano4ka [1.4K]
4 years ago
13

Consider array items, which contains the values 0, 2, 4, 6 and 8. If method changeArray is called with the method call changeArr

ay(items, items[2]), what values are stored in items after the method has finished executing?
Computers and Technology
1 answer:
bagirrra123 [75]4 years ago
5 0

INCOMPLETE QUESTION

Consider array items, which contains the values 0, 2, 4, 6 and 8. If method changeArray is called with the method call changeArray(items, items[2]), what values are stored in items after the method has finished executing?

public static void changeArray(int[] passedArray, int value)

{

passedArray[value] = 12;

value = 5;

}

A. 0, 2, 5, 6, 12.

B. 0, 2, 12, 6, 8.

C. 0, 2, 4, 6, 5.

D. 0, 2, 4, 6, 12.

Answer:

D. 0, 2, 4, 6, 12

Explanation:

The initial values for the array was 0,2,4,6,8. The method changeArray ( ) when called changes the the the value of the element at the ith index position to 12. so the final elements in the array will be 0,2,4,6,12

You might be interested in
______ view is generally used for creating, formatting and designing slide​
Sauron [17]
Normal view is generally used for formatting and designing slide
5 0
3 years ago
Which careers require completion of secondary education, but little to no postsecondary education? Mathematical Technicians and
Masteriza [31]

Answer:

Nondestructive Testing Specialists and Surveying Technicians

3 0
3 years ago
Read 2 more answers
Describe the effect of a pull up resistor
Vesna [10]
With a pull-up resistor, the input pin will read a high state when the button is not pressed. In other words, a small amount of current is flowing between VCC and the input pin (not to ground), thus the input pin reads close to VCC. When the button is pressed, it connects the input pin directly to ground.
3 0
4 years ago
Consider the following code segment, where num is an integer variable.int[][] arr = {{11, 13, 14 ,15},{12, 18, 17, 26},{13, 21,
Setler79 [48]

Answer:

c. 16 17

Explanation:

Given

num = 14

The above code segment

Required

The output

In the code segment, we have the following iterations:

for (int j = 0; j < arr.length; j++) and for (int k = 0; k < arr[0].length; k++)

The above iterates through all the elements of the array.

The if condition is true, only on two occasions

(i) When i = 0; j = 2

(ii) When i = 3; j = 0

i.e.

arr[0][2] = 14

arr[3[0] = 14

So, the result of the print statement is: j + k + arr[j][k]

(i) When i = 0; j = 2

j + k + arr[j][k]  = 0 + 2 + 14 = 16

(ii) When i = 3; j = 0

j + k + arr[j][k]  = 3 + 0 + 14 = 17

<em>Hence, (c) 16 17 is true</em>

6 0
3 years ago
What is the process called when programmers look for and fix errors in code?
AveGali [126]

Answer:

d

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • You are attempting to open a file containing a list of integer numbers, each on a separate line, and read them into Python as in
    6·1 answer
  • What is the subjects under artificial intelligence ?​
    15·1 answer
  • How do i get rid of pop ups??
    9·2 answers
  • A palindrome is a word or phrase that reads the same both backward and forward. The word ""racecar"" is an example. Create an al
    15·1 answer
  • What was the best Metal Gear Solid you enjoyed the most?​
    6·1 answer
  • For each compound below, identify any polar covalent bonds and indicate the direction of the dipole moment using the symbols δ +
    12·1 answer
  • What is this car first to awnser is the brianliest
    5·2 answers
  • A histogram titled Greeting card sales has date on the x-axis and cards (millions) on the y-axis. January is 1 card, February: 1
    12·2 answers
  • I need help with this question!
    11·1 answer
  • There is a population of owls in a forest. In one year there are 20 new owls born and 10 owls die. In this same year, 5 owls ent
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!