You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*The void function should take three arrays, array1 , array2 and sum_array. sum_array or the array name that is passed to sum_array should be printed in main program.
// Write a function that adds two arrays*/
#include <stdio.h>
void SumOfArrays (int[],int[], int[], int);
int main()
{
int array1[4]={1,2,3,4};
int array2[4]={-1,-2,-3,-4};
int sum_array[4];
int arraySize=4;
SumOfArrays(array1,array2,sum_array,arraySize);
// print elements of sum_array
for(int i=0;i<4;i++)
{
printf("%d\n",sum_array[i]);
}
}
void SumOfArrays(int array1[],int array2[],int sum_array[], int arraySize)