1.题略 #include <stdio.h> int main(void) { ; printf("Please enter text here(end with Ctrl + Z):\n"); while (ch=getchar() != EOF) i++; printf("There are %d characters in text.\n", i); ; } 运行结果 输入第一个Ctrl+Z时,并没有结束,下一行再输入Ctrl+Z才检测到EOF.
多方查找无果,看了官方解释如下: "CTRL-S and CTRL-Q are called flow-control characters. They represent an antiquated way of stopping and restarting the flow of output from one device to another (e.g., from the computer to your terminal) that was useful when the spee