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