求教数组元素函数传递问题
#include <stdio.h>#define b 100
int c=0,d=0,f=0,i=0;
int count(char a[])
{
int h;
for(h=0;h<b;h++)
{
if(a[h]>='A'&&a[h]<='z')
c++;
else if(a[h]>='0'&&a[h]<='9')
d++;
else if(a[h]==' ')
f++;
else if(a[h]=='\0')
break;
else
i++;
}
}
void main()
{
char a[b];
scanf("%s",a);
count(a[b]);
printf("all of letter are %d\n",c);
printf("all of number are %d\n",d);
printf("all of space are %d\n",f);
printf("all of others are %d\n",i);
}