1typedef struct node{
2 int value; //this is the value the node stores
3 struct node *next; //this is the node the current node points to. this is how the nodes link
4}node;
5
6void printList(node *head){
7 node *tmp = head;
8
9 while(tmp != NULL){
10 if(tmp->next == NULL){
11 printf("%d", tmp->value);
12 }
13 else{
14 printf("%d, ", tmp->value);
15 }
16 tmp = tmp->next;
17 }
18}