Write a program to allow the user to enter people with their age. The names will be a full name consisting of a last, possibly a middle initial, and a first name. The full name will be no longer than 40 characters in length. The full name and age will be stored in a node of a doubly linked list. Data entry will be from the keyboard and will read the full name followed by the age. Data entry will terminate when nothing is entered for the full name.

Use a subroutine to enter the data and pass the head and tail pointers to the subroutine, do not use global pointers.

Once the data is completely entered, use another subroutine to print out the people to the screen and to the file output.txt from the first to the last.

Then use a subroutine to print out the people to the screen and to the file output.txt from the last to the first.

All head and tail pointers will be passed to the functions, no global data. The nodes will be dynamically allocated in memorY

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.