The exercise says \"Make a function with parameters two int arrays and k which is their size. The function should return another array (size k) where every element of it is the
int sum[k] ;
k is a variable but the size of the array should be a constant.
k
The function should return another array (size k) ...
But the function you wrote returns void which is clearly wrong.
void
Do I have to do it with pointers?
Yes.