I read on the faqs that it is bad to use feof to control a loop. I've always used the following loop to clear the input buffer and now I am wondering how could I change it to make it correct. Thanks.
Code:while(!feof(stdin) && getchar() != '\n');