Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

½Ð°Ý¤@¤U³o¨â­Óprintf¥X¨Óªº¤º®e¦³¦ó¤£¦P

0 views
Skip to first unread message

kenny

unread,
Nov 8, 2001, 11:09:48 AM11/8/01
to

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

0 new messages