假设p指向链表中的第一个结点,q指向第二个结点,可以将q指向的结点删除并释放的语句是?
A.(*p).next=(*q).next; delete p;
B.p=q->next; delete q;
C.p=q; delete q;
D.p->next=q->next; delete q;
A.(*p).next=(*q).next; delete p;
B.p=q->next; delete q;
C.p=q; delete q;
D.p->next=q->next; delete q;
第1题
A.(*p).next=(*q).next; delete p;
B.p=q->next; delete q;
C.p=q; delete q;
D.p->next=q->next; delete q;
第2题
A.删除 p 结点
B.删除 p 结点的直接前驱结点
C.删除 p 结点的直接后继结点
D.删除 p 结点及其所有后继结点
第3题
A.s->next=p;q->next=s->next;
B.p->next=s->next;s->next=q;
C.s->next=q;p->next=s->next;
D.q->next=s->next;s->next=p;
第4题
A.s->next=p->next;p->next=-s;
B.q->next=s; s->next=p;
C.p->next=s->next;s->next=p;
D.p->next=s;s->next=q;
第6题
A.p->next=p2; p1->next=p;
B.p1=p;p=p2;
C.p=p2;p1->next=p;
D.p1=p;p->next=p2;
第7题
A.q=p->next; p->next=q->next; free(q);
B.q=p; p->next=q->next; free(q);
C.q=p->next; p=q->next; free(q);
D.q=p->next; q->next=p->next; free(q);
第9题
A.p->prior=q;q->next=p;p->prior->next=q;q->prior=q;
B.p->prior=q;p->prior->next=q;q->next=p;q->prior=p->prior;
C.q->next=p;q->prior=p->prior;p->prior->next=q;p->prior=q;
D.q->prior=p->prior;q->next=q;p->prior=q;p->prior=q;
第10题
A.p->prior=q;q->next=p;p->prior->next=q;q->prior=q;
B.p->prior=q;p->prior->next=q;q->next=p;q->prior=p->prior;
C.q->next=p;q->prior=p->prior;p->prior->next=q;p->prior=q;
D.q->prior=p->prior;q->next=q;p->prior=q;p->prior=q;
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!