Question: Write a C program to create a binary file containing records of students in a class. Then, read back contents of the file and print


Write a C program to create a binary file containing records of students in a class. Then, read back contents of the file and print to screen. Use the following structure to save information about a student: struct Student char first_name [30]; char last_name [30]; int id; J; Follow the steps below to implementyour code: 1. Create a Student structure. 2. Open binary file student_records.bin for output 3. Read the name and id of a student from input and save in the Student 4. 5. 6. 7. structure. Write the structure to the binary file. Repeats steps 3 and 4 until a blank line is entered in input. Close the file. Open the file for input. ta time from the file and print to screen until reaching end of file. Close the file and exit program. 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
