I have a function call
void copy_data(FILE *fin, FILE *fout, int size) {
char buf[size];
memset(buf, 0, size);
fread(buf, sizeof buf, 1, fin);
fwrite(buf, sizeof buf, 1, fout);
}
Is malloc here necessary, because I read that I need to use malloc when I don't know the size at compile time which I don't know here, but I feel like malloc is not neccesary here.