填空题

以下程序的功能是:通过函数func输入字符并统计输入字符的个数,输入时用字符@作为输入结束标志。请填空。
#include <stdio.h>
long ______;/*函数说明语句*/
main()
long a;
a=func();printf("n=%ld\n",a);

long func()
long b;
for(b=0;getchar()! =’@’;b++;);
retum b;

【参考答案】

func()