I'm writing a function which is to read in a file and insert the text character by character into an array, and then return a pointer to that array. The max size permitted for the file is supposted to be 2KB.
Here's what I have now:
int main(){
char data[2048];
char* data4=layer4(data);
}
char* layer4(char array[]){
FILE *fp;
fp=fopen("sendfile.txt","r+");
fscanf(fp, "%c", array);
for(int i=0; i<2048; i++){
printf("%c\n",array[i]);
}
return &array;
}