notes else * temp/*store this pointer as root *if(temp->data keytemp temp->lchildelse temp temp->rchildreturn(null)/ function to delete the node whose data value is given *struct tnode *delete(struct tnode * ,int valstruct tnode * * *tempx getptr( ,val,& )ifx =nullprintf("the node does not exists\ ")return( )else /this code is for deleting root node*ifx =ptemp ->lchildy ->rchildp tempwhile(temp->rchild !nulltemp temp->rchildtemp->rchild=yfree( )return( )/this code is for deleting node having both children *ifx->lchild !null & ->rchild !nullif( ->lchild =xlovely professional university