第28699题 单选题
针对带有头结点的单链表,若要在指针p指向的节点之后插入一个新节点s,下列操作序列中正确的是?

已知单链表节点结构定义为:typedef struct LNode { int data; struct LNode *next; } LNode;,所有操作均使用C语言风格的指针语法。

A

p->next = s; s->next = p->next;

B

s->next = p; p->next = s;

C

s->next = p->next; p->next = s;

D

s->next = p->next->next; p->next = s;

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析