我在终端上运行这个c程序
#include <stdio.h>
int main() {
int result = 0;
while(result <= 0)
{
int result = (getchar() != EOF);
result = 2;
printf("x");
}
printf("out\n");
}
Run Code Online (Sandbox Code Playgroud)
之后我输入单词"hello",然后返回.结果是我得到了多个'x'字符.
为什么不在第一个'x'之后终止?