i got the prototype down and i indented, and I am trying to figure out why it still tells me that foo is not a function?
Code:
#include <stdio.h>
#include <stdlib.h>
double* makeAnArray(double size);
void foo(double*a, double size);
int main (void)
{
double *anArray;
int size=0;
int i;
double *foo;
printf("Please enter the size of the array ");
scanf("%d", &size);
anArray=makeAnArray(size);
for (i = 0; i < size; i++)
{
printf("%.1f ", anArray[i]);
}
printf("\n");
foo(anArray,size);
free(anArray);
getchar();
return 0;
}
double* makeAnArray(double size){
double* array;
array =calloc(size,sizeof(double));
return array;
}
void foo (double* a, double size){
int i;
for (i=0; i<size; i++){
*(a+i)=132;
}
}