I'm trying to read in inputs from the terminal, I want to stop reading inputs if there is a blank line and enter is pressed. Here is what I have at the moment.
#include <stdio.h>
#include <string.h>
int main(int argc,char const *argv[]){
char input[1024];
while(fgets(input,1024,stdin)!=NULL){
printf("%s", input);
}
if(EOF){
printf("EOF");
}
return 0;
}