![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-56/ti_inject-812ce.png)
若有如下定义,函数 fun 的功能是( )。其中 head 指向首结点,整个结构如下图: ┌──┬─┐ ┌──┬─┐ ┌──┬──┐ head →│data│ ┼→│data│ ┼→ ... →│data│NULL│ └──┴─┘ └──┴─┘ └──┴──┘ struct node{ int data; struct node *next; }; int fun(struct node* head) { int n=0; struct node* t=head; while(t!=NULL) { n++; t=t->next; } return n; }