#include
void f(char *a,char *b,char *c,int *p){
int i,j;
char *x[3]={a,b,c};
p[0]=p[1]=p[2]=p[3]=0;
for(i=0;i<3;i++)
for(j=0;x[i][j];j++)
if(x[i][j]>='A' && x[i][j]<='Z' || x[i][j]>='a' && x[i][j]<='z')
p[0]++;
else if(x[i][j]>='0' && x[i][j]<='9')
p[1]++;
else if(x[i][j]==' ')
p[2]++;
else
p[3]++;
}
int main(int argc,char *argv[]){
char a[100],b[100],c[100];
int d[4];
printf("Input 3 strings(Separated by Enter)...\n");
gets(a),gets(b),gets(c);
f(a,b,c,d);
printf("Letter: %d\n Digit: %d\n Space: %d\n Other: %d\n",d[0],d[1],d[2],d[3]);
return 0;
}