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

前端 未结 8 1066
一个人的身影
一个人的身影 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:46

    To recognize EOF in Turbo C++, in the terminal window press Ctrl+z; this will act as EOF in the program and then terminate the program....with the condition:

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

提交回复
热议问题