64,635
社区成员
发帖
与我相关
我的任务
分享
while(*(p++))
k++;
while(*p != 0)
{
p++;
k++;
}
int strlen( const char *str ) //输入参数const
{
assert( strt != NULL ); //断言字符串地址非0
int len;
while( (*str++) != '\0' )
{
len++;
}
return len;
}