Question
C programming- TEXT FILES Struct array shall have at least 4 fields, with at least one of these being a string and at least one
C programming- TEXT FILES
Struct array shall have at least 4 fields, with at least one of these being a string and at least one being a number (int or double).
When the user runs the program, they shall be greeted with a menu of options like what is shown below (What would you like to do (A=Add record to list, W=Write all records to file, R=Read all records from file, E=Exit): .
This menu shall be repeated to the user (over and over) until the user finally selects "E" to exit (at which point the program shall stop).
If the user chooses "A", they shall be prompted to enter a struct (record), this record shall be added to the end of your struct list, and a report shall be printed that shows the record that was just added to the end of the list.
If the user chooses "W", the program shall write all the structs (one struct per line) to a text file.
If the user chooses "R", the program shall read all the struct data from a text file (one line holds one struct). This operation shall replace the current struct array. Then, the program shall print a report showing all the struct data (just read from the text file).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started