填空题

下列程序的功能是:求出ss所指字符串中指定字符的个数,并返回此值。
例如,若输入字符串123412132,指定字符1,则输出3。请填空。
#include<stdio.h)
#deftne M 81
int fun(char * ss,char c)
int i=0;
for(; 【18】 ;ss++)
if(*ss==c) i++;
return i;
main()
char a[M],ch;
printf("\nPlease enter a string:");gets(a);
printf("\nPlease enterachar:");ch=getchar();
printf("\nThe number of the char is:%d\n",fun(a,ch));

【参考答案】

*ss! =’\0’