#include<stdio.h>
#include<string.h>
int mylen(const char *a)
{
int i,cnt=0;
for(i=0;a[i];i++)//读取a[i]最后,返回0,判断为假,跳出循环
cnt++;
return cnt;
}
int main ()
{
char a[100];
gets(a);
int t=mylen(a);
printf("%d",t);
return 0;
}
08-07
39
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-21
756
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-20
735
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-09