请在 下方输入 要搜索的题目:

如下程序的功能为对链表中所有结点数据域内容求和,其中head指向一个带头结点的单链表,在下划线处需要分别填入的正确内容为______。 struct link{ int data; struct link * next; } int main(void){ struct link * head; sum(head); } int sum(_______){ struct link * p; int s=0; p=head->next; while(p){ s+=_______; p=_______; } }


A、struct link *head
p->data


p->next;
B、struct link head
p->data


p->next;
C、struct link *head
p->next->data
p->next;
D、struct link *head
p->data


p

发布时间:2024-10-24 19:36:11
推荐参考答案 ( 由 快搜搜题库 官方老师解答 )
联系客服
答案:struct link *head p->data p->next
专业技术学习
专业技术学习
搜搜题库系统