This is my linked list function that adds the new node to the end of the list.

```
void addNodeAtTail( struct Student *student, struct Courses *newNode )
  {
      newNode->next = NULL;           // sucessor of newNode is NULL, because newNode becomes tail of list
      if ( student->list == NULL )
          student->list = newNode;    // if list is empty, newNode will be head of list
  else
  {
      struct Courses *temp = student->list;
      while( temp->next != NULL ) // search last element in list
          temp = temp->next;
      temp->next = newNode;       // successor of last node is newNode
  }
  }

```

Can this same function be used for adding a node to a diffrent linked list that I may have? Or do I have to create another function because we are dealing with another struct?