A pointer is a variable that contains an address (of some other variable). You have to use the asterisk (*) operator to read/write to the data at that address.

Code:

void avg_sum (
float a [10], // don't need the size here, it's in 'n'
int n=9 , // C doesn't allow default parameters
float *avg,
float *sum) {
int i;
float s, v: // don't need these, use the pointers
sum = &s;
avg = &v;
for (i = 0; i < n; i++) {
s += a [i];
}
avg = sum/n; // use * appropriately
}

This is all you have to do:

Code:

void avg_sum (float a[], int n, float *avg, float *sum) {
(*sum) = 0;
int i;
for (i = 0; i < n; i++) {
(*sum) += a [i];
}
(*avg) = (*sum)/n;
}
int main()
{
const int size = 6;
float data[size] = {1.4, 3.0, 7.32, 2.5, 3.14, 14.1};
float sum, average;
avg_sum(data, size, &sum, &average);
printf(
"# elements: %d\n"
"sum total: %g\n"
"avgerage: %g\n",
size, sum, average);
return 0;
}