函数实现strcmp.
来源:互联网 发布:ubuntu ssh 远程登录 编辑:程序博客网 时间:2024/06/06 02:58
#include<stdio.h>int my_strcmp(char const *str1, char const *str2){while (*str1 == *str2){str1++;str2++;if (*str2 == '\0')return 0;}if (*str1 < *str2)return -1;elsereturn 1;}int main(){char *a = "abc";char *b = "abcd";int ret=my_strcmp(a, b);printf("%d\n", ret);return 0;}
0 0
- strcmp函数实现
- strcmp函数的实现
- 实现strcmp()函数
- strcmp函数的实现
- strcmp函数的实现
- strcmp函数的实现
- 实现strcmp 函数
- C++ - 实现strcmp函数
- 实现strcmp函数
- strcmp函数的实现
- strcmp函数的实现
- strcmp函数的实现
- strcmp函数实现
- strcmp函数实现
- strcmp函数的实现
- strcmp函数实现
- strcmp函数的实现
- 函数strcmp的实现
- Swift版本的图片轮播器框架
- SPOJ 694 Distinct Substrings
- ECShop - 数据库操作类
- 面试
- Android软件开发之盘点所有Dialog对话框大合集(一)
- 函数实现strcmp.
- Sqlserver SET NOCOUNT ON不返回受影响行数
- Android中Parcelable接口用法
- Python Show-Me-the-Code 第 0012 题 替换敏感词
- 交互设计技巧——创造好的用户体验(2)(翻译)
- 安装tinyhttpd遇到的问题
- python入门笔记--循环(for...range\enumerate\zip)、列表推导
- 错误:HttpServlet was not found on the Java
- 类方法与对象方法