#include double add_items(double *array){ double sum = 0; for( ; *array != 0.0; array++) { sum += *array; *array += 10.0; } return sum; } int main(){ double a[] = {3.14, 5.16, 7.83, 0.0}; printf("Sum: %lf\n", add_items(a)); for(double *array = a; *array != 0.0; array++) { printf("*array = %lf\n", *array); } }