Answer:
The function C is as follows:
int *apply_all(int arr1[], int arr2[], int size) {
int result[size];
for(int i =0; i<size;i++){
result[i] = arr1[i] * arr2[i];
printf(" %d", result[i]);
}
return result;
}
Explanation:
This line defines the function
int *apply_all(int arr1[], int arr2[], int size) {
This declares an array that holds the result of the function
int result[size];
This iterates through the array
for(int i =0; i<size;i++){
This multiplies the corresponding elements of both arrays
result[i] = arr1[i] * arr2[i];
This prints the result of the multiplication
printf(" %d", result[i]);
}
This return the a pointer to the new array
return result;
}
<em>See attachment for complete program that includes the main</em>