You need to pass a pointer to a pointer to myFunction
#include <stdio.h>
#include <stdlib.h>
int myfunction(float **input) {
int i,n=10;
*input = realloc( *input, n*sizeof(float) );
if(*input!=NULL) {
for(i=0;i<n;i++) (*input)[i] = (float)i;
return(n);
}
else return(-1);
}
int main(int argc, char *argv[]) {
float *data = NULL;
int n = myfunction(&data);
int i;
for(i=0;i<n;i++) printf("%f\n",data[i]);
free(data);
return 0;
}