设为首页 加入收藏

TOP

重写strlen函数(不使用标准库函数)
2014-11-24 01:43:22 来源: 作者: 【 】 浏览:14
Tags:重写 strlen 函数 使用 标准

int strlen( const char *str ) //输入参数const
{
 assert( strt != NULL ); //断言字符串地址非0
 int len;
 while( (*str++) != ‘\0′ )
 {
  len++;
 }
 return len;
}


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Java面向对象编程知识笔试面试选.. 下一篇用pl/sql developer 导出数据的方..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: