Skip to content

Instantly share code, notes, and snippets.

@EvanGertis
Created February 5, 2019 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EvanGertis/00139677e4e8c9ab3a35ee3763e08868 to your computer and use it in GitHub Desktop.
Save EvanGertis/00139677e4e8c9ab3a35ee3763e08868 to your computer and use it in GitHub Desktop.
int main()
{
int choice, data, x, k;
struct node *head;
head = (struct node *)malloc(sizeof(struct node));
head->info = 0;
head->link = NULL;
createList(head);
while (1)
{
printf("1. Display list\n");
printf("2. Quit\n\n");
printf("Enter your choice: ");
scanf("%d", &choice);
switch (choice)
{
case 1:
displayList(head);
break;
case 2:
return 0;
break;
default:
break;
}
};
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment