Driver code
int main ( ) { Node * head = newNode ( 5 ) ; insert ( & head , 4 ) ; insert ( & head , 3 ) ; insert ( & head , 2 ) ; insert ( & head , 1 ) ; printList ( head ) ; cout << " List ▁ After ▁ Reversing " << endl ; reverseList ( & head ) ; printList ( head ) ; return 0 ; }