If the file is variable or undefined length in record format, fflush() causes the current record to be written out, which in turn causes a new record to be created for subsequent writes. If the file is of fixed record length, no action is taken.
fflush() clears a previous ungetc() character.