Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Suppose that you have declared a numeric array named values that has 13 eleme

ID: 3566950 • Letter: 3

Question

3. Suppose that you have declared a numeric array named values that has 13 elements. Which of the following must be true?

a. values[0] is smaller than values[1]

b. values[2] is stored adjacent to values[4]

c. values[13] is out of bounds

d. values[12] is the largest value in the array

9. Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0. Which of the following is an allowed operation?

a. values[2] = 17

b. input values[0]            c. values[3] = values[0] + 10

d. all of the above

10. Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0. Which of the following is an allowed operation?

a. values[4] = 80

b. values[2] = values[4]

Explanation / Answer

3.) D because in an array with 13 slots they are numbered 0-12.

9.) D all of the above. You are allowed to change the stored value in arrays. Also, you can use the different values in the arrays to do differeent functions such as the arithmetic.

10.) C In the array Values[4] there is no value for array index four. they are indexes 0,1,2,3.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote