K reverse is not giving output
Hey @shrutikatyal,
If you dry run your code once tail1 is NULL initially and you are trying to access tail1->next which is resulting in a runtime error. Try to modify your code once within the given logic so that the code does not access tail->next when tail itself is NULL . (use if condition when tail1 is NULL) .
Hope it helps
.
If your doubt is now resolved please mark it as resolved and rate me accordingly .
Else you can further questions here .
Thankyou
https://ide.codingblocks.com/s/330726If you dry run your code once tail1 is NULL initially and you are trying to access tail1->next which is resulting in a runtime error. Try to modify your code once within the given logic so that the code does not access tail->next when tail itself is NULL . (use if condition when tail1 is NULL) .i cnt understand your ans if possible make change in the line due to which run time error arises