I have a program that is supposed to get input from a user until it receives EOF.
\n or white spaces are considered as legal chars,
but the console recognizes neither ^z nor ^d as EOF and the program continues to run until stopped manually.
Tried both:
while (currChar != EOF)
{
scanf("%c", &currChar);
}
and:
scanf("%c", &currChar);
if (currChar==EOF)
break;