struct node *addafter(struct node *lastint dataint itemif (last =nullreturn nullstruct node *temp*pp last -next/searching the item do if ( ->data =itemtemp (struct node *)malloc(sizeof(struct node))/assigning the data temp -data data/adjusting the links temp -next -next/adding newly allocated node after -next temp/checking for the last node if ( =lastlast tempreturn lastp -nextwhile ( !last -next)cout <item <not present in the list <endlreturn last