标签:style blog http io ar color sp strong on
代码如下:
#include <stdio.h>
int Strlen(const char *s)
{
if( NULL == s)
return -1;
if('\0' == *s)
return 0;
else
return Strlen(s+1)+1;
}
int main()
{
printf("Strlen(\"123\")=%d\n",Strlen("123"));
return 0;
} 输出结果:
分析过程:
标签:style blog http io ar color sp strong on
原文地址:http://blog.csdn.net/dezhihuang/article/details/41378765