当前位置:网站首页>(pointer) write a function to compare the size of strings by yourself, which is similar to StrCmp.
(pointer) write a function to compare the size of strings by yourself, which is similar to StrCmp.
2022-07-04 04:20:00 【I'm not Xiao Haiwa~~~~】
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;
}
边栏推荐
猜你喜欢

【罗技】m720

干货!基于GAN的稀有样本生成

Storage of MySQL database

User defined path and file name of Baidu editor in laravel admin

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.

Msgraphmailbag - search only driveitems of file types

02 specific implementation of LS command

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

DP83848+网线热拔插

函数计算异步任务能力介绍 - 任务触发去重
随机推荐
Epidemic strikes -- Thinking about telecommuting | community essay solicitation
Three years of graduation, half a year of distance | community essay solicitation
图解网络:什么是热备份路由器协议HSRP?
Brief explanation of depth first search (with basic questions)
2021 RSC | Drug–target affinity prediction using graph neural network and contact maps
VIM mapping command
User defined path and file name of Baidu editor in laravel admin
leetcode刷题:二叉树07(二叉树的最大深度)
Myslq delete followed by limit
疫情来袭--远程办公之思考|社区征文
北漂程序员,月薪20K,一年攒15W,正常吗?
支持首次触发的 Go Ticker
postgresql 用户不能自己创建表格配置
Flink学习7:应用程序结构
指针数组和数组指针
毕业三年,远程半年 | 社区征文
DP83848+网线热拔插
Graduation summary
RHCSA 06 - suid, sgid, sticky bit(待补充)
dried food! Generation of rare samples based on GaN