题目
现要将q和r所指结点交换前后位置,同时要保持链表的连续,以下不能完成此操作的语句是______。
A.q->next=r->next; p->next=r,r->next=q;
B.p->next=r,q->next=r->next;r->next=q;
C.q->next=r->next;r->next=q;p->next=r,
D.r->next=q;P->next=r;q->next=r->next;
第1题
现有以下结构体说明和变量定义,如图所示,指针p、q、r分别指定一个链表中连续的3个结点。
A.q->next=r->next;p->next=r;r——>next=q;
B.Q->next=r;q->next=r->next;r——>next=q;
C.Q->next=r->next;r->next=q;p——>next=r;
D.qnext=q;p->next=r;q->next=r->next;
第2题
现有以下结构体说明和变量定义,如图所示,指针p、q、r分别指定一个链表中连续的3个结点。struct node {bar data; struct node*next;}*p,*q,*r; 现要将q和r所指结点交换前后位置,同时要保持链表的结构,下列不能完成此操作的语句是()。
A.q->next=r->next;P >next=r;r- >next =q;
B.q->next=r;q->next=r->next;r->next=q;
C.q->next=r->next;r->next=q;P->next=r:
D.q->next=q;P->next=r;q->next=r-> next;
第3题
现有以下结构体说明和变量定义,如图所示,指针P、q、r分别指定一个链表中连续的3个结点。
struct node
{har data;
struct node*next;)*P,*q,*r;
现要将q和r所指结点交换前后位置,同时要保持链表的结构,下列不能完成此操作的语句是()。
A.q-:>next=r->next;p--:>next=r;rm:>next=q;
B.q-:>next=r;q->next=r->next;r->next=q;
C.q-:>next=r->next;r->next=q;p->next=r;
D.q-:>next=q;p->next=r;q->next=r->next;
第4题
现有以下结构体说明和变量定义,如图所示,指针P,q,r分别指向一个链表中连续的三个结点。
struct node { char data; struct node *next; } *p,*q,*r; 现要将q和r所指结点交换前后位置,同时要保持链表的连续,以下不能完成此操作的语句是()。
A.q->next=r->next;p->next=r;r->next=q;
B.p->next=r;q->next=r->next;r->next=q;
C.q->next=r->next;r->next=q;p->next=r;
D.r->next=q;P->next=r;q->next=r->next;
第5题
现有以下结构体说明和变量定义,如图所示,指针 p 、 q 、 r 分别指向一个链表中连
续的三个结点。
struct node
{ char data;
struct node *next;
} *p,*q,*r;
现要将 q 和 r 所指结点交换前后位置,同时要保持链表的连续,以下不能完成此操作的语句是
A)q->next=r->next;p->next=r;r->next=q;
B)p->next=r;q->next=r->next;r->next=q;
C)q->next=r->next;r->next=q;p->next=r;
D)r->next=q;p->next=r;q->next=r->next;
第6题
A.q->next=r->next;p->next=r;r->next=q;
B.p->next=r;q->next=r->next;r->next=q;
C.q->next=r->next;r->next=q;p->next=r;
D.r->next=q;p->next=r;q->next=r->next;
第7题
有以下结构体说明和变量定义,如图所示: struet node {int data; struct node*next;}*p,*q,*r;
现要将q所指结点从链表中删除,同时要保持链表的连续,以下不能完成指定操作的语句是
A.p->next=q->next;
B.p->next=p->next->next;
C.p->next=r;
D.p=q->next;
第8题
有以下结构体说明和变量定义,如图所示,指针p、q、r分别指向此链表中的3个连续结点。
struct node
{ int data;struct node *next; }*p,*q,*r;
现要将这个链表构成一个环,以下()操作是正确的。
A.p->next=q->next
B.r->next=p
C.p->next=r
D.r->next=q->next->next
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!