I am a newbie at C programming.
In a C script which counts characters in a given input I used EOF to detect the end of input but it didn't work. the input keeps being displayed on the screen and no output is provided. Enter or Ctrl + C don't do!
The script is as given below:
nc = 0;
while (getchar() != EOF)
How am I going to make it detect the EOF? What is EOF exactly?