当前位置:网站首页>(指針)自己寫一個比較字符串大小的函數,功能與strcmp類似。
(指針)自己寫一個比較字符串大小的函數,功能與strcmp類似。
2022-07-04 04:19:00 【我不是蕭海哇~~~~】
int strcmps(const char *s1,const char *s2)
{
while(*s1!='\0'&& *s2!='\0')
{
if(*s1>*s2)
return 1;
else if(*s1<*s2)
return -1;
s1++;
s2++;
}
if(*s1>*s2)
return 1;
else if(*s1<*s2)
return -1;
return 0;
}
边栏推荐
- 2022-07-03: there are 0 and 1 in the array. Be sure to flip an interval. Flip: 0 becomes 1, 1 becomes 0. What is the maximum number of 1 after turning? From little red book. 3.13 written examination.
- Programmers' telecommuting is mixed | community essay solicitation
- Graduation summary
- [Logitech] m720
- Infiltration practice guest account mimikatz sunflower SQL rights lifting offline decryption
- 毕业三年,远程半年 | 社区征文
- LevelDB源码解读-SkipList
- Three years of graduation, half a year of distance | community essay solicitation
- PostgreSQL users cannot create table configurations by themselves
- 一位毕业生的自我分享
猜你喜欢

postgresql 用户不能自己创建表格配置

Pytest multi process / multi thread execution test case

Restore the subtlety of window position

【罗技】m720

Infiltration practice guest account mimikatz sunflower SQL rights lifting offline decryption

PostgreSQL users cannot create table configurations by themselves

I Build a simple microservice project

Flink learning 6: programming model

软件测试是干什么的 发现缺陷错误,提高软件的质量
![[Logitech] m720](/img/bb/44144a1c3907808398c05b3b36962c.png)
[Logitech] m720
随机推荐
How to dynamically cache components in Vue multi-level route nesting
Penetration practice - sqlserver empowerment
批处理初识
Redis cluster uses Lua script. Lua script can also be used for different slots
There is a problem that the package cannot be parsed in the like project
Graduation project: design seckill e-commerce system
I was tortured by my colleague's null pointer for a long time, and finally learned how to deal with null pointer
ctf-pikachu-CSRF
laravel admin里百度编辑器自定义路径和文件名
Illustrated network: what is the hot backup router protocol HSRP?
Katalon uses script to query list size
指针数组和数组指针
[book club issue 13] packaging format of video files
01 QEMU starts the compiled image vfs: unable to mount root FS on unknown block (0,0)
ctf-pikachu-XSS
JDBC advanced
Reduce function under functools
量子力学习题
网络 - VXLAN
函数计算异步任务能力介绍 - 任务触发去重