Created
February 5, 2019 13:01
-
-
Save EvanGertis/79931057d925c029fbeed77fda07de27 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
void createList(struct node *head) | |
{ | |
int n, data; | |
// prompts. | |
printf("Enter the number of nodes that you would like insert "); | |
scanf("%d", &n); | |
// guard. | |
if(n == 0){ | |
return; | |
} | |
// get the data for the nodes. | |
for(int i = 0; i < n; i++){ | |
printf("Enter the data that you would like to store at node %d :", i); | |
scanf("%d", &data); | |
insertAtEnd(head, data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment