- #1

anonim

- 40

- 2

- Homework Statement:
- Calculate the Math Formula

- Relevant Equations:
- -

C:

```
double foo(int arr[], double *ave, int index){
double *s;
*s=*ave;
// calculation//
return(foo (arr,ave,index));
// other calculation//
}
```

I want to keep the ave value during the recursion, because after ave is calculated, I will do another calculation is recursively in this function. But I write like this, I am getting segmentation fault.