【C语言】字符串操作函数my_strcmp
来源:互联网 发布:苹果笔记本推荐 知乎 编辑:程序博客网 时间:2024/06/08 13:53
<span style="font-size:18px;">//实现字符串操作函数strcmp#include<stdio.h>int my_strcmp(char *str1,char *str2){while(*str1==*str2){if(*str1=='\0')return 0;else{str1++;str2++;}}if(*str1>*str2)return -1;elsereturn 1;}int main(){char *p="aacdef";char *q="aadcde";int ret=my_strcmp(p,q);printf("%d\n",ret);return 0;}</span>
0 0
- 【C语言】字符串操作函数my_strcmp
- 【C语言】my_strcmp字符串比较
- C语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- C语言 字符串操作函数
- C语言字符串操作函数
- c语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- c语言字符串操作函数
- C语言字符串操作函数
- C语言字符串操作函数
- Js 常用调试的方法
- leetcode Regular Expression Matching
- Ubuntu 重置mysql 密码
- Android-百度地图的调用 (基础版本)
- BeanFactoryPostProcessor和BeanPostProcessor的区别
- 【C语言】字符串操作函数my_strcmp
- jS 回车事件
- cocos2dx 音频模块分析(3): 背景音乐部分
- Step into Scala - 26 - 隐式参数,隐式转换与 DSL
- 得到屏幕大小的两种方法
- 【C语言】字符串操作函数my_strcat
- DM3730:在24 bit的LCD上顯示 RGB656的android initlogo.rle Logo
- ERROR: x86 emulation currently requires hardware acceleration!
- 【原创】利用notpad + .Net Reflector 进行软件破解小试