1.4 Ctrl+D and Ctrl+Z issues (1.4)


Well-Known Member
I have read a lot of threads about how to count lines, some suppose that an empty line shoud not be counted as a newline, but this suggest that ctrlD on its own line should count as a line,so if I enter:
this is 1 line or 2 lines?
Any line that contains any character in addition to ctrlD counts as a line


C++ Student
i find this link is very useful to understand EOF getchar() from the perspective of how they are designed and how they function. Right now some students are too anxious, and focus only on how to apply it in the HW so that HW can be handed in. I believe if you understand the foundamental design, you can easily finish the HW. However, this website is in Chinese. Still I hope it is helpful at least for some chinese students.
C语言中EOF与Ctrl+Z - 皖林的博客 - CSDN博客