Can I ignore getting end-of-file in C?

I found nothing about this online.

I am trying to make a program that asks a user for input. I already know how to terminate the program after getting EOF.

if(feof(stdin)) exit(1);


while(!feof(stdin)) { ... }

Read more here:

Content Attribution

This content was originally published by meaj-gnu-linux at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: