Assignment:
Write a program that manages a linked list of records stored in "struct"s. An rough example should look like the program below:
typedef struct node{ char *myString;
struct node* next;
}
Each "node" will manage a string, and a pointer to the next node in the list. Cook up a menu like so:
void main_menu()
{
char char_choice[3]; int int_choice = 0;
do
{
printf("\n");
printf("Main Menu: \n\n");
printf("1. XXX\n"); printf("2. YYY\n"); printf("3. Etc...\n");
scanf("%s", char_choice); int_choice = atoi(char_choice);
switch (int_choice) {
case 1:
function_XXX(); break;
case 2:
function_YYY(); break;
case 3:
function_Etc(); break;
default:printf("Wrong choice. Enter Again");
break;
}
}while(int_choice !=99);
The menu should allow you to add a string, modify a string, delete a string, list the strings, or quit.
This will give you enough practice with linked list.