Originally Posted by
crazyeyesz28
Suppose you have a main() with three local arrays, all the same and type (say float). The first two are already initialized to values. Write a function called “addarrays()” that accepts the address of the three arrays as arguments
To get you started the prototype of such a function would be like this:
Code:
addarrays(float *array1ptr, float *array2ptr, float *array3ptr, unsigned int Size);
adds the contents of the first two arrays together, element by element; and places the results in the third array before returning.
something like this
Code:
while(size!=0)
{
*array3ptr= *array1ptr+*array2ptr;
array1ptr++;
array2ptr++;
array3ptr++;
Size--;
}