Created
February 5, 2019 13:03
-
-
Save EvanGertis/00139677e4e8c9ab3a35ee3763e08868 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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