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

needs calculate by hand!!! The answers are: 4. B 5. B 6. A include stdio.h 3 def

ID: 3831477 • Letter: N

Question

needs calculate by hand!!! The answers are: 4. B 5. B 6. A

include stdio.h 3 defi SIZE 7 5 int changeArray (int CJ, int) 7 int main int x SIZE] 19, 5, 4, 2, 1, 3 H; 10 int i 11 12 13 14 xcij change Array (x, i) 15 16 17 printf ("x 01 n", x 01) 18 printf ("x 31 n", x 31) 19 printf ("x 61 n", x 61) 20 21 turn (0) 22 23 24 int change Array (int z int i) 25 26 int j 27 int result o; 28 29 for (j SIZE 1; j 0 i; j--) 30 result j) result; 31 32 33 34 return result) 35 4. Which of the following is the output generated by the first print statement in the program above? A x C. x 0] 33 [0] 21 D. None of the above. B. x [0] 24 5. Which of the following is the output generated by the second print statement in the program above? A. x [3] C. x 3 D. None of the above. B. x [3] 6. Which of the following is the output generated by the third print statement in the program above? A. x [6] C. x 6 D. None of the above. B. x [6] 3

Explanation / Answer

Basically the new value of x[i] is sum of x[i]tox[SIZE-1] in the old array of x.
4) The answer is B. x[0] = 24, because x[0] = 9+5+4+2+1+3

So x[0] is 24

5) The answer is B. x[3] = 6, because x[0] = 2+1+3

6) The answer is A. x[6] =0, because x[6] = 0 even in the old array, and there is nothing else to add.