题目内容

带头结点的单链表的结点结构包含数据域data、指针域next,当前指针为p,则使p指向下一个结点的语句是( )。

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

查看答案
更多问题

带头结点的单链表的结点结构包含数据域data、指针域next,当前指针为p,要把q所指结点链接到p所指结点之后的语句是( )。

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

带头结点的单链表的结点结构包含数据域data、指针域next,头指针为head,要把p所指结点链接到head所指结点之后的语句是( )。

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

带头结点的单链表的结点结构包含数据域data、指针域next,头指针为head,判断链表为空的条件是( )。

A. head->next=NULL
B. head=NULL
C. head->next==NULL
D. head.next==NULL

带头结点的单链表的结点结构包含数据域data、指针域next,已知p、q、r分别指向链表中连续的三个结点,下面删去q所指结点的语句错误的是( )。

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

答案查题题库