字符串比较函数strcmp()

    xiaoxiao2025-02-27  45

    strcmp是 string compare的缩写,即“字符串比较”。他的原型是:

    #include<string.h> int strcmp(const char *s1, const char *s2);

    功能是比较 s1和s2所指向的字符数组中的字符串,返回一个int型值。s1和s2可以是字符数组名或者字符指针变量名。

    最新回复(0)