struct nodeTag
{
int data;
struct nodeTag *link;
};
struct nodeTag node, *head, *tail, *p;
main()
{
head=(struct nodeTag *)malloc(sizeof(node));
head->data = 11;
tail=(struct nodeTag *)malloc(sizeof(node));
tail->data = 99;
tail->link = NULL;
head->link = tail;
printf("address of head = 0x%p\n", &head);
printf("content of head = 0x%04x\n", head);
下面是我看書上的範例,有關鏈結串列的
可是我不懂的地方是~~在printf 之後的 &head 和head有什麼不同呢??
謝謝大家的解答
--
※ Origin: 楓橋驛站<bbs.cs.nthu.edu.tw> ◆ From: 61-217-171-87.HINET-IP.hinet.net