#include <stdio.h>
main()
{
char c;
char letter[10],space[10];
char digit[10],other[10];
int i=0,j=0,k=0,m=0;
printf("请输入一行字符:\n");
while((c=getchar())!='\n')
{
if(c==' ') { space[i]=c ;i++;}
else if(c>='a'&&c<='z'||c>='A'&&c<='Z') { letter[j]=c;j++;}
else if(c>='0'&&c<='9') {digit[k]=c;k++;}
else {other[m]=c;m++;}
}
space[i]='\0';
digit[k]='\0';
letter[j]='\0';
other[m]='\0';
printf ("letter is %s\n",letter) ;
printf ("digit is %s\n",digit);
}