I'll add some details on how to open the file to append the data to it:


FILE *f = fopen("your_file", "a");