69,369
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
#include<string.h>
void main()
{
char string[10] = "i+1+2+i";
int j,n;
for(j=0; j<10; j++)
{
n = (string[j] == 'i');
printf("%d\n", n);
}
}
RETURN VALUES
The strcmp() and strncmp() return an integer greater than, equal to, or
less than 0, according as the string s1 is greater than, equal to, or
less than the string s2. The comparison is done using unsigned charac-
ters, so that `\200' is greater than `\0'.