Assume a main function contains declarations for three type double arrays-c, d, and e, each with six elements. Also, assume that values have been stored in all array elements. Explain the effect of each valid call to add_arrays. Explain why each invalid call is invalid.
Function to Add Two Arrays
/*
* Adds corresponding elements of arrays arl and ar2, storing the result in
* arsum. Processes first in elements only.
* Pre: First n elements of arl and ar2 are defined. arsum's corresponding
* actual argument has a declared size >= n(n >= 0)
*/
void
add_arrays (const double arl[ ], /* input- */
const double ar2U, /* arrays being added */
double arsum /* output - sum of corresponding elements of arl and ar2 */
int n) /* input - number of element
pairs summed */
{
int i;
/* Adds corresponding elements of arl and ar2 +/ for (i = 0; i < n; ++i)
arsum[i] = arl[i] + ar2[i];
a) a add_arraysarl, ar2, c, 6);
b. add_arrays(c[6], d[6], e[6], 6);
c. add_arrays(c, d, e, 6);
d. add_arrays(c, d, e, 7);
e. add_arrays(c, d, e, 5);
f. add_arrays(c, d, 6,3);