circular linked list circular linked list is linked list where all nodes are connected to form circle there is no null at the end circular linked list can be singly circular linked list or doubly circular linked list advantages of circular linked lists any node can be starting point we can traverse the whole list by starting from any point we just need to stop when the first visited node is visited again useful for implementation of queue unlike this implementationwe don' need to maintain two pointers for front and rear if we use circular linked list we can maintain pointer to the last inserted node and front can always be obtained as next of last circular lists are useful in applications to repeatedly go around the list for examplewhen multiple applications are running on pcit is common for the operating system to put the running applications on list and then to cycle through themgiving each of them slice of time to executeand then making them wait while the cpu is given to another application it is convenient for the operating system to use circular list so that when it reaches the end of the list it can cycle around to the front of the list circular doubly linked lists are used for implementation of advanced data structures like fibonacci heap insertion in an empty list initially when the list is emptylast pointer will be null after inserting node tafter insertiont is the last node so pointer last points to node and node is first and last nodeso is pointing to itself function to insert node in an empty liststruct node *addtoempty(struct node *lastint data/this function is only for empty list if (last !nullreturn last