已知带头结点的链栈top,则该链栈为空的条件是()
A: top->next==NULL
B: top==NULL
C: top->next->next==NULL
D: top->next==top
A: top->next==NULL
B: top==NULL
C: top->next->next==NULL
D: top->next==top
举一反三
- 已知带头结点的链栈top, 则该链栈为空的条件是( ) A: top==NULL B: top->next= =NULL C: top->next->next= =NULL D: top->next= =top
- 已知带头结点的链栈top, 则该链栈为空的条件是( ) A: top==NULL B: top->next= =NULL C: top->next->next= =NULL D: top->next= =top
- 已知带头结点的链栈top, 则该链栈不空时, 出栈操作的语句是( ) A: top->;next=top->;next->;next; *x=top->;next->;data; B: *x=top->;next->;data; top->;next=top->;next->;next; free(top->;next); C: *x=top ->;data;p=top;top =p->;next;free(p); D: *x=top->;next->;data;p=top->;next;top->;next=p->;next;free(p);
- 已知带头结点的链栈top,则元素x对应的新结点s进栈操作的语句是() A: top->next=s;s->next=top->next; B: s->next=top->next;top->next=s; C: s->next=top;top=s; D: top=s;s->next=top;
- 已知带头结点的链栈top, 则元素x对应的新结点s进栈操作的语句是() A: s->next=top->next;top->next=s; B: top->next=s; s->next=top->next; C: s->next=top;top =s; D: top =s; s->next=top;