-->
当前位置:首页 > 题库

单选题:已知单链表L中,指针 q所指结点 是指针p所指结点的直接前驱,若在 q与 p之间插入结点*s,其语句应为()。

Luz5年前 (2021-05-10)题库1028
已知单链表L中,指针 q所指结点 是指针p所指结点的直接前驱,若在 q与 p之间插入结点*s,其语句应为()。 @[B](2)

A. `s->next = p-> next; q-> next = s`
B. `(*q). next =s;(*s).next = p`
C. `q -> next = s; s-> next =q->next`
D. `p-> next = s; s-> next =q`




A.`s->next = p-> next; q-> next = s`
B.`(*q). next =s;(*s).next = p`
C.`q -> next = s; s-> next =q->next`
D.`p-> next = s; s-> next =q`


答案:B