若有以下定義: 則不能將q所指向的結點連到上圖所示鏈表末尾的一組語句是()
A.q->next=NULL;p=p->next;p->next=q B.p=p->next;q->next=p;p->next=q C.p=p->next;q->next=p->next;p->next=q D.p=(*p).next;(*q).next=(*p).next;(*p).next=q
若有以下定義 則能保留鏈表其它結點,而刪除p所指向結點的程序段是()
A.head->next=p->next;free(p) B.head->next=p;p->next=head->next;free(p) C.free(p);head->next=p;p->next=head->next D.free(p);head->next=p->next
若有以下定義: 則能夠把c插入到a和b之間并形成新鏈表的程序段是()
A.a.next=c;c.next=b B.head.next=p;p.next=head.next C.head->next=&c;p->next=head->next D.(*head).next=p;(*p).next=&b