Question: Write this in a C program please. Structures on Disk The Problem Your task is to write a program that stores and retrieves structures in

Write this in a C program please.

Write this in a C program please. Structures on Disk The Problem

Structures on Disk The Problem Your task is to write a program that stores and retrieves structures in a file on disk. The file of structures must remain on the disk once your program ends. You should be able to store structures to the file and retrieve from the file after restarting the program. The record that you will be writing to file has the following structure: struct contact {unsigned long phone_number; long first_name_posn; long last_name_posn; long company_name_posn; long email_posn; long next;}; first_name_posn, last_name_posn, company_name_posn, and email_posn are the position in the file of the First Name, Last Name, Company Name, and Email variable strings. These "locations" will be required for writing and reading the information to be stored. When you write the structures on disk you will need to store the First Name, Last Name, Company Name, and Email strings separately from the contact structure. In the file you will write the contact structure first followed by the First Name, Last Name, Company Name, and Email strings (if they exist). The only required information is the Phone Number - all other information is optional. The position "next" stores the location in the file where the next contact record is stored. The file can contain any number of records and associated strings. The name of the file will be myContactList.db and if the file does not exist then you program must create it. Interface (input and output) Your program will have an input interface that does the following: Do you wish to enter a new contact (Yes or No)?: First Name: Last Name: Company Name: Phone Number (enter only numbers): Email

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 Databases Questions!