(Solved):Define, using C, two arrays x and f, each of size 10, using call-by-reference (that is, use pointers). to pass the array to a function named Sum. In main: define array, pass arrays, print out the a… View Answer…

 

Question

Define, using C, two arrays x and f, each of size 10. Using call-by-reference (that is, use pointers) pass the array to a function named Sum.

In main: define array, pass arrays, print out the array and the results on screen.

In function Sum, take arrays from main and sum the arrays using the formula below:

{eq}displaystyle Sum = sum_1^{10}e^{x_i}-5 * x_i^2

{/eq}

 

EXPERT ANSWER

#include <stdio.h>
double sum( int *z)
{
    double k,p,total;
    total=0;
    for (int

Scroll to top