能帮我解释下两者的区别吗
# include <stdio.h># include <string.h>
int main()
{
char string[81];
int i,word = 0, num = 0;
char c;
gets(string);
for(i = 0;(c = string[i])!='\0';i++) // 和 for(i=0;(c = string[i] != '\0');i++) 的区别?顺便解释下后者的意义
if(c == ' ')
word = 0;
else if(word == 0)
{
word = 1;
num++;
}
printf("There is %d words in this line.\n", num);
return 0;
}