下列函数的功能是求链表长度,填空完成程序。 struct node {char ch; struct node*link; }; str(struct node*p) {int ① ; w

admin2017-10-26  33

问题 下列函数的功能是求链表长度,填空完成程序。
    struct node
    {char ch;
    struct node*link;
    };
    str(struct node*p)
    {int    ①    ;
    while(p!=NULL)
    {    ②    ;
    count++:
    }
    return(count);
    }

选项

答案①count=0 ②p=p一>next

解析
转载请注明原文地址:https://kaotiyun.com/show/r9kx777K
0

最新回复(0)