关于#c语言#的问题,请各位专家解答!

#include<stdio.h>
#include<string.h>
int main()
{
void fun( char *p);
char arr[20],*p;
gets(arr);
p=&arr[20];
fun(p);
return 0;
}
void fun(char *p)
{
int i,a=0,b=0,c=0,d=0,e=0;
for(i=0;*p!='\0';i++)
{ if('a'<=*p&&'z'>=*p)
a++;
else if('A'<=*p&&'Z'>=*p)
b++;
else if('0'<=*p&&'9'>=*p)
c++;
else if(*p==' ')
d++;
else
e++;}
printf("小写字母有%d\n",a);
printf("大写字母有%d\n",b);
printf("数字有%d\n",c);
printf("空格有%d\n",d);
printf("其他有%d\n",e);
}