Check out example codes for "append to list in c". It will help you in understanding the concepts better.

Code Example 1

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;
}

Learn ReactJs, React Native from akashmittal.com