单选题:在单链表中,指针域为next,要将q所指结点链接到p所指结点之后,其语句序列应为( )
在单链表中,指针域为next,要将q所指结点链接到p所指结点之后,其语句序列应为( )
A.q->next=p->next; p->next=q;
B.p->next=q; q->next=p->next;
C.q->next=p+1; p->next=q;
D.p->next=q; q->next=p;
答案:A
A.q->next=p->next; p->next=q;
B.p->next=q; q->next=p->next;
C.q->next=p+1; p->next=q;
D.p->next=q; q->next=p;
答案:A