已知h是指向單向加頭鏈表的首指針,刪除表頭結點的操作是()。
A.free(h->;next);h=h->;next
B.p=h,h=p->;next;free(p)
C.p=h->;next;free(p);h=h->;next
D.p=h->;next,h->;next=p->;next;free(p)
正確答案:p=h->;next,h->;next=p->;next;free(p)
已知h是指向單向加頭鏈表的首指針,刪除表頭結點的操作是()。
A.free(h->;next);h=h->;next
B.p=h,h=p->;next;free(p)
C.p=h->;next;free(p);h=h->;next
D.p=h->;next,h->;next=p->;next;free(p)
正確答案:p=h->;next,h->;next=p->;next;free(p)