Follow these steps to implement a circular linked list:
- Define a structure called node. To store data in a circular linked list, define a data member in the node structure. Besides a data member, define a pointer that will point at the next node.
- A pointer called startList is initialized to NULL. The startList pointer will designate the start of the circular linked list.
- A menu is displayed and the user is asked to press 1 to add elements to the circular linked list, 2 to display elements of the circular linked list, and 3 to quit the program. If the user enters 1, go to step 4. If they enter 2, go to step 16. If they enter 3, it means they want to quit the program, so go to step 23.
- The user is prompted to specify how many ...