在一个单链表中,若要删除由指针q所指向结点(若q存在后继结点的话),则执行()操作。
A.p=q->nextp->next=q->next,交换p、q所指结点的数据域的值
B.p=q->next.q->next=p.交换p、q所指结点的数据域的值
C.p=q->next交换p、q所指结点的数据域的值q->next=p->next
D.q->next=q->next->next,q->next=q
A.p=q->nextp->next=q->next,交换p、q所指结点的数据域的值
B.p=q->next.q->next=p.交换p、q所指结点的数据域的值
C.p=q->next交换p、q所指结点的数据域的值q->next=p->next
D.q->next=q->next->next,q->next=q
A.p=q->next,p->next=q->next,交换p、q所指结点的数据域的值
B.p=q->next,q->next=p,交换p、q所指结点的数据域的值
C.p=q->next交换p、q所指结点的数据域的值q->next=p->next
D.q->next=q->next->next,q->next=q
A.q=p->next;q->next=p->next;
B.q=p->next;p->next=q;
C.q=p->next;p->next=q->next;
D.p->next=p->next->next;p->next=p;
A.删除 p 结点
B.删除 p 结点的直接前驱结点
C.删除 p 结点的直接后继结点
D.删除 p 结点及其所有后继结点
A.(A) p=q; p->next=q;
B.(B) p->next=q; q->next=p;
C.(C) p->next=q->next; p=q;
D.(D) q->next=p->next; p->next=q;
A.q:=p↑.link;p↑.link:=q↑.link;
B.p↑.link:=q↑.link;q:=p↑.link;
C.q↑.link:=p↑.link;q↑.1ink:=q;
D.p↑.link:=q;q↑.link:=p↑.link;
A.(A) p=q; p->next=q;
B.(B) p->next=q; q->next=p;
C.(C) p->next=q->next; p=q;
D.(D) q->next=p->next; p->next=q;
A)q;=p↑.link;p↑.link:=q↑,link;
B)p↑.link.q↑.link;q:=p↑.link;
C)q↑.link::p↑.link;P↑.link:=q;
D)P↑.link:=q;q↑.link:=p↑.link;
设指针变量p指向单链表中结点A,若删除单链表中结点A,则需要修改指针的操作序列为()。
A.q=p->next;p->data=q->data;p->next=q->next;free(q);
B.q=p->next;q->data=p->data;p->next=q->next;free(q);
C.q=p->next;p->next=q->next;free(q);
D.q=p->next;p->data=q->data;free(q);
A.p->next=q->next;free(q);
B.p=p->next; p->next=q->next;free(q);
C.p->next=p->next;free(q);
D.p =p->next->next;free(q);
A.q:=p^.1ink;p^.link:=q^.link
B.p^.link:=q^.link;q:=p^.link
C.q^.link:=p^.link;p^.link=q
D.p^.link:=q;q^.link:=p^.link
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!