I am working on a study guide for my final exam and need help with this question. Thanks in advance for the help.
Write a value-returning function called "prod" that has parameters of two int arrays "arr1" and "arr2" of size"length". "Length" is also a parameter. This function should return the product of all components of "arr2" for which the corresponding components of "arr1" are negative.
Here is what i have so far, but dont know if its what I need.
int prod(arr1[], arr2[], length);
{
if (arr1[] <0)
product = arr2[]*arr2[];
return product;
}