appending in a list C code example
Example: append to list in c
void Append(Node *head, Node node){
Node tmp = *head;
if(*head == NULL) {
*head = node;
return;
}
while(tmp->next != NULL){
tmp = tmp->next;
}
tmp->next = node;
return;
}