Circular Singly Linked List | Insertion |  ; This function is only for empty list ; Creating a node dynamically . ; Assigning the data . ; Note : list was empty . We link single node to itself .
struct Node * addToEmpty ( struct Node * last , int data ) { if ( last != NULL ) return last ; struct Node * temp = ( struct Node * ) malloc ( sizeof ( struct Node ) ) ; temp -> data = data ; last = temp ; temp -> next = last ; return last ; }