C_文件读写流
strcmp()
所在頭文件:string.h
功能:比較倆個字符串
一般形式:strcmp(字符串1,字符串2)
說明:
當S1<S2時,返回為負數(shù)return result,result<0
當S1=S2時,返回值=0
當S1>S2時,返回正數(shù)return result,result>0
倆個字符串自左向右逐個字符比較(按ASCII值大小相比較)知道出現(xiàn)不同的字符或遇“\0“為止
如”a“>"A"”A“<"B"
特別注意:strcmp(const char *s1,const char *s2)這里面只能比較字符串,不能比較數(shù)字等其他形式的參數(shù)
轉(zhuǎn)載于:https://www.cnblogs.com/tangt/p/3811964.html
總結(jié)
 
                            
                        - 上一篇: 使用iometer测试
- 下一篇: apache htpasswd.exe创
