设单循环链表中结点的结构为(data, next),且rear是指向非空的带表头结点的单循环链表的尾结点的指针。若想删除链表第一个结点,则应执行下列哪一个操作?
A: s = rear;rear = rear->next;free(s);
B: rear = rear->next->next; free(rear);
C: rear = rear->next;free(rear);
D: s = rear->next->next;rear->next = s->next;free(s);
A: s = rear;rear = rear->next;free(s);
B: rear = rear->next->next; free(rear);
C: rear = rear->next;free(rear);
D: s = rear->next->next;rear->next = s->next;free(s);
举一反三
- 问题:设单循环链表中结点的结构为(data, next),且rear是指向非空的带表头结点的单循环链表的尾结点的指针。若想删除链表第一个结点,则应执行下列哪一个操作?选项: A: A:s = rear->next->next;rear->next = s->next;free(s); B: B: s = rear;rear = rear->next;free(s); C: C:rear = rear->next;free(rear); D: D:rear = rear->next->next; free(rear);
- 设单循环链表中结点的结构为(date,next),且rear是指向非空的带表头结点的单循环链表的尾结点的指针。若想删除链表的第一个结点,则应执行下列哪一个操作? A: s=rear>next->next; rear->next->next=s->next; B: rear=rear->next;free(rear); C: rear=rear->next->next; free(rear); D: s=rear->next->next;rear->next=s->next; free(s);
- 问题:设单循环链表中结点的结构为(data, next),且rear是指向非空的带表头结点的单循环链表的尾结点的指针。若想删除链表第一个结点,则应执行下列哪一个操作?选项: A: A:s = rear->next->next;rear->next = s->next;free(s); B: B: s = rear;rear = rear->next;free(s); C: C:rear = rear->next;free(rear); D: D:rear = rear->next->next; free(rear);
- 设单循环链表中结点的结构为(data, next),且rear是指向非空的带表头结点的单循环链表的尾结点的指针。若想删除链表第一个结点,则应执行下列哪一个操作? A: rear = rear->next;free(rear); B: s=rear->next->next; rear->next->next=s->next; C: rear = rear->next->next; free(rear); D: s = rear->next->next;rear->next = s->next;free(s);
- 在循环链表中,将头指针改设为尾指针(rear)后,其首元节点和尾节点的存储位置分别是()。 A: rear和rear->;next->;next B: rear->;next和rear C: rear->;next->;next和rear D: rear和rear->;next