while(ptr -next !startptr ptr -nextptr -next start -nextfree(start)start ptr -nextreturn startstruct node *delete_end(struct node *startstruct node *ptr*preptrptr startwhile(ptr -next !startpreptr ptrptr ptr -nextpreptr -next ptr -nextfree(ptr)return startstruct node *delete_after(struct node *startstruct node *ptr*preptrint valprintf("\ enter the value after which the node has to deleted ")scanf("% "&val)ptr startpreptr ptrwhile(preptr -data !valpreptr ptrptr ptr -nextpreptr -next ptr -nextif(ptr =startstart preptr -nextfree(ptr)return startstruct node *delete_list(struct node *startstruct node *ptrptr startwhile(ptr -next !startstart delete_end(start)free(start)return startoutput *****main menu **** create list display the list add node at the beginning delete the entire list exit enter your option enter - to end enter the data enter the data