Question: Writing and Reading a Binary File Create a text file that stores a First name, a last name, and an age, one record per line.

Writing and Reading a Binary File

Create a text file that stores a First name, a last name, and an age, one record per line.

TheCprogram will read a line of text from this file and then create a structure (what other languages would call a record) containing that data. Then write the object in a new binary file. The binary file that you have created should contain a series of records, each record containing a first name, last name and an age.

The program should then close the file and re-open it for input, read the file record by record and display on the screen, one record per line.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!