第六次作业

笔记

 

 

 

 

代码

 

 

问题

 

为什么p->next->n能得到7的值。

p->next可以得到&a[1],而p->next->n就可以得到a[1],也就是7。

 

 

一般连接链表的表达方式:

if (head==NULL)

head=p;
p->next=NULL;
tail=p;
}
else{
tail->next=p;
p->next=NULL;
tail=p;}

 

 

 

posted @ 2020-04-26 20:35  张枝鑫  阅读(97)  评论(0)    收藏  举报