Hi guys i've just started to learn the c programming language in computing class so im a real noob. This code is writing seven records to a binary file succesfully but the text its outputing is all over the place and not very neat when i open it in notepad. Is there any way to control the way it appears when i open it in notepad? I also just read in another post that you should never use fflush(stdin) but my teacher uses it so i think ill probably need to include that if you's dont mind.

Any help would be much appreciated.

Thanks
Code:
 
void add_book()
{
	record_file = fopen("C:\\bookfile.bin","wb");
    
    system("cls");
    
    printf( "\n\nAdd book details");
    
    for(num_records=0;num_records<=7;num_records++)
         {
           printf( "\n\nISBN: ");
           fflush(stdin);
           gets(record_array[num_records].ISBN);
           printf( "\n\nAuthor: ");
           fflush(stdin);
           gets(record_array[num_records].Author);
           printf( "\n\nTitle: ");
           fflush(stdin);
           gets(record_array[num_records].Title);
           printf( "------------------------------------" );
           
           fwrite(&record_array[num_records],sizeof(record_structure),1,record_file);
          } 
          
           fclose(record_file);
    
    screen_pause();
}