第一篇:程序設(shè)計總結(jié)
? Strcmp的用法
原型:extern int strcmp(const char *s1,const char * s2);
用法:#include
功能:比較字符串s1和s2。
說明:
當(dāng)s1 當(dāng)s1=s2時,返回值=0 當(dāng)s1>s2時,返回值>0 即:兩個字符串自左向右逐個字符相比(按ASCII值大小相比較),直到出現(xiàn)不同的字符或遇'
? Strcmp的用法
原型:extern int strcmp(const char *s1,const char * s2);
用法:#include
功能:比較字符串s1和s2。
說明:
當(dāng)s1 當(dāng)s1=s2時,返回值=0 當(dāng)s1>s2時,返回值>0 即:兩個字符串自左向右逐個字符相比(按ASCII值大小相比較),直到出現(xiàn)不同的字符或遇'