带头结点双向链表的结点结果定义如下:typedef struct Dnode{ElemType data;struct DNode *prior, *next;}DNode,*DoubleList;现有p指针指向第i个结点,删除第i个节点,则以下语句中的正确的是( )
A. (p->prior)->next=p->next;(p->next)->prior=p->prior;free(p);
B. (p->prior)->next=p->next;if(p->next!=NULL)(p->next)->prior=p->prior;free(p);
C. (p->next)->prior=p->prior;(p->prior)->next=p->next;free(p);
D. if(p->next!=NULL)(p->next)->prior=p->prior;(p->prior)->next=p->next;free(p);