text: Deletion at different positions in a Circular Linked List | Function to delete First node of Circular Linked List ; check if list doesn 't have any node  if not then return ; check if list have single node if yes then delete it and return ; traverse second node to first ; now previous is last node and first node ( firstNode ) link address put in last node ( previous ) link ; make second node as head node
code: void DeleteFirst ( struct Node * * head ) { struct Node * previous = * head , * firstNode = * head ; if ( * head == NULL ) { printf ( " List is empty " return ; } if ( previous -> next == previous ) { * head = NULL ; return ; } while ( previous -> next != * head ) { previous = previous -> next ; } previous -> next = firstNode -> next ; * head = previous -> next ; free ( firstNode ) ; return ; }