Averaging the values from multiple arrays. For this assignment you will implement a C function that modifies the elements in an array of integers. To start you create three separate 32bit integer arrays of 5 elements each. Next you populate each array using the values listed below. There are 20 values listed for each of three arrays named A1, A2, A3
This array controls the order in which the element in the first three arrays are to be averaged. For example the first number in the control arrays is 0, therefore using the data from above you would average 32, 30 and the 31 then print the result. Then move on to the second element in the control array or the value of 19 (this last entry in the arrays A1, A2, and A3). For the second number in the control array you would average 2, 6, and 1 the print the result.
I'm lost on how to do for loop for multiple array... and he did not even tech that in classCode:#include <stdio.h> int main() { int i; int sum = 0; int A1[20]={32,12,9,4,88,65,87,87,75,7,86,86,963,84,37,9,48,8,88,2}; int A2[20]={30,7,0,6,434,6547,6,889,959,346,6,8,2,27,89,8,6,3,3,6}; int A3[20]={31,5,5,7,8,1,768,436,6,2,9785,111,404,238,2,4,3,9,96,1}; int array[20]={0,19,17,15,13,11,2,4,6,8,10,1,3,5,18,16,7,9,12,14}; for(i=array;i<array;i++){ sum = sum + (A1+A2+A3) [i]; } printf("Average of Arrays", sum); return 0; }