write and test a function that sets each element in an array to the sum of the corresponding elements in two other arrays. for example, if array 1 has the values { 2, 4, 5, 8 } and array 2 has the values { 1, 0, 4, 6 }, the function should assign array 3 the values { 3, 4, 9, 14 }. be sure to include all the tests you performed to demonstrate that this function works as specified.
int *sum_arrays(int *a, int *b) {
int a_size = sizeof(a) / sizeof(int);
int b_size = sizeof(b) / sizeof(int);
int n = min(a_size, b_size);
int *arr = malloc(sizeof(int) * n);
for (int i = 0; i < n; i++) {
arr[i] = a[i] + b[i];
}
return arr;
}