Sum an array · Sumar un array
Sum an array
Add the n integers that a points to. A pointer like const int *a works just like an array — a[i] is the i-th element.
Sumar un array
Agregue los n enteros a los que apunta a. Un puntero como const int *a funciona igual que un array: a[i] es el i-ésimo elemento.
Complete int sum_array(const int *a, int n) to return the sum of the n elements. Do not write main — the checker provides one. · Complete int sum_array(const int *a, int n) para devolver la suma de los n elementos. No escriba main — el verificador proporciona uno.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.