设rear是指向带头结点的非空循环单链表的尾指针,则删除表首结点的操作可表示为( )
A.正确答案Dp=rear;
B.
rear=rear->next;
free (p)rear=rear->next;
C.
free(rear);rear=rear->next->next;
D.
free (rear);p=rear->next->next;
rear->next->next=p->next;free(p);
设rear是指向带头结点的非空循环单链表的尾指针,则删除表首结点的操作可表示为( )
设rear是指向带头结点的非空循环单链表的尾指针,则删除表首结点的操作可表示为( )
A.正确答案Dp=rear;
B.
rear=rear->next;
free (p)rear=rear->next;
C.
free(rear);rear=rear->next->next;
D.
free (rear);p=rear->next->next;
rear->next->next=p->next;free(p);