未分类 · 2025年11月21日

设链式栈中结点结构为(data,next),且top是指顶指针。要在链式栈中插入一个由指针s所指的结点,应执行下列哪个操作? A.s->next=top->next;top->next=s; B.top->next=s; C.s->next=top;top=s; D.s->next=top;top=top->next;

设链式栈中结点结构为(data,next),且top是指顶指针。要在链式栈中插入一个由指针s所指的结点,应执行下列哪个操作? A.s->next=top->next;top->next=s; B.top->next=s; C.s->next=top;top=s; D.s->next=top;top=top->next;

正确答案:C