Driver code
int main ( ) { Node * head = newNode ( 10 ) ; head -> next = newNode ( 20 ) ; head -> next -> next = newNode ( 10 ) ; head -> next -> next -> next = newNode ( 30 ) ; head -> next -> next -> next -> next = newNode ( 40 ) ; head -> next -> next -> next -> next -> next = newNode ( 10 ) ; head -> next -> next -> next -> next -> next -> next = newNode ( 60 ) ; printf ( " Before ▁ moveToEnd ( ) , ▁ the ▁ Linked ▁ list ▁ is STRNEWLINE " ) ; printList ( head ) ; int key = 10 ; moveToEnd ( head , key ) ; printf ( " After moveToEnd ( ) , the Linked list is " printList ( head ) ; return 0 ; }