append the rest of
f1
to
f3
while(fread(&record1,1ength,1,f1_ptr) != 0)
fwrite(&record1,1ength,1,f3_ptr);