You can use fprintf on a file just like you might on a console with printf. For example to keep track of game wins, losses and ties you might write
/* saves wins, losses and, ties */
void savewlt(FILE *fout, int wins, int losses, int ties)
{
fprintf(fout, "Wins: %d\nTies: %d\nLosses: %d...