#include<stdio.h>
void fun(char *p,int *k1,int *k2,int *k3,int *k4,int *k5)
{
int i;
for(i=0;*(p+i)!='\0';i++)
{
if(*(p+i)>='A'&&*(p+i)<='Z')
*k1++;
else if(*(p+i)>='a'&&*(p+i)<='z')
*k2++;
else if(*(p+i)>='0'&&*(p+i)<='9')
*k3++;
else if(*(p+i)==' ')
*k4++;
else
*k5++;
}
}
void main()
{
int k1=0,k2=0,k3=0,k4=0,k5=0;
char s[100];
printf("input the data:\n");
scanf("%s",s);
fun(s,&k1,&k2,&k3,&k4,&k5);
printf("大写字母:%d\n小写字母:%d\n数字:%d\n空格:%d\n其它:%d\n",k1,k2,k3,k4,k5);
}
能运行,但输出全为0,求解