不用中间变量实现strlen函数

2014-11-23 23:30:06 · 作者: · 浏览: 6

int strlen(const char*s)
{
if(*s==0)
return 0;
else
return strlen(s+1)+1;
}

摘自:宋金时的专栏