#include<stdio.h>
main()
{
int i,t;
char a[5];
i=t=0;
gets(a);
while(a[i]!='\0'){
t++;
i++;
}
printf("The length of the string is %d\n",t);
}
main()
{
int i,t;
char a[5];
i=t=0;
gets(a);
while(a[i]!='\0'){
t++;
i++;
}
printf("The length of the string is %d\n",t);
}

一分耕耘,一分收获。