Problem D: 【选择题】链表
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:408
Solved:132
Description
1. 假定已建立以下链表结构,且指针p和q已指向如下图所示的结点:
则以下选项中可将q所指的结点从链表中删除,并释放该结点的语句组是( )。
A.(*p).next=(*q).next;free(p); B.p=q.>next; free(q);
C.p=q;free(q); D.p->next =q->next; free(q);
Input
#include<iostream>
int main()
{
// 答案为A则输出 cout << "A" ;
return 0;
}
int main()
{
// 答案为A则输出 cout << "A" ;
return 0;
}
Sample Input Copy
Sample Output Copy