“`”

【参考答案】
int m ystrcmp(const c har* str1, const char* str2)
{
assert((str1 != NULL) && (str2 != NULL));
int r et = 0;
while (!(ret = <em>(unsigned char</em>)str1 – * (unsigned char*)str2) && *str2)
{
str1++;
str2++;
}
if (ret > 0)
ret = 1;
else if (ret < 0)
ret = -1;
return ret;
}

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.