That code doesn't add anything to the file because you open it for read only:
FILE * fw = fopen("new.csv", "r");
(That's what the "r" part means) so when you try to write to the file, the request will always fail.
You could open it for read and write access (by changing "r" to "rw") but ... you would want to use
fseek[
^] to absolutely position yourself at the end of the file before each write - oir you will overwrite the existing data (and given this is CSV data, that will almost certainly make the whole file pretty much useless).
You also only ever read four values from your file, regardless of how many it may contain.