while ((c = getchar()) != EOF) Not terminating

前端 未结 8 1064
一个人的身影
一个人的身影 2020-12-02 01:54

I\'ve been reading \"The C Programming Language\" and I got to this part of inputs and outputs.

I\'ve read other threads saying that the console doesn\'t recognize e

8条回答
  •  醉酒成梦
    2020-12-02 02:41

    On Windows, you type Ctrl-Z on a line by itself (no spaces or anything) and type the Return after that. On Windows, you could technically skip the EOF indicator and keep reading characters, though this doesn't apply to other operating systems because EOF actually means EOF.

提交回复
热议问题