#include <stdio.h>
#include <stdlib.h>
int main(void) {
char text[256];
while (1) {
puts("Text?");
fgets(text, sizeof(text), stdin);
fflush(stdout); // should you flush everytime?
}
return 0;
}
For example, if you were to create user input and print in an while loop that doesn't break, should you flush? Is it also necessary to flush stdin?
If also you would fputs in stderr, would you also have to flush stderr in this scenario?