單項選擇題

在一個頭指針為ph的單鏈表中,若要在指針q所指結點的后面插入一個由指針p所指向的結點,則執(zhí)行()操作。

A.p->next=q->next;q=p
B.p->next=q->next;q->next=p
C.q->next=p->next;p->next=q
D.q->next=p->next;p->next=q->next

微信掃碼免費搜題