I am trying to get user input with fgets
in C and am having trouble using the while loop.
Here is the code I am using:
char input[300];
fgets(input, 300, stdin);
while(strcmp("Quit", input) != 0) {
fgets(input, 300, stdin);
}
When I enter Quit
the loop continues and does not terminate and I don't understand why this is so.