I was asked to write a function that returns the average value of numbers in an array. It's pretty straight forward:

```
int array_sum(int seq[], int len) {
int sum = 0;
for (int i = 0; i < len; ++i) {
sum += seq[i];}
return sum;}

float array_avg(int seq[], int len) {
int sum = number_sum(seq,len);
return sum/len;}

```

But now I have to rewrite it so that seq is a pointer:

```
int array_sum(int *seq, int len) {   <--- This function is working properly
int sum =0;
for(int *p = seq; p < len+seq; ++p)
{sum += *p;}
return sum;}  

float seq_avg(int *seq, int len) {
int sum = number_sum(*seq,len);  <---- THIS LINE CAUSES AN ERROR
return sum/len;}

```

I have tried

-number\_sum(\*seq,len);

-number\_sum(&seq,len);

but none of them seem to work. How to make it work?