Hmm, someone typed this function below and I don't understand it.
2 questions:Code:void clear_buffer(void) { int ch; while((ch = getchar()) != '\n' && ch != EOF); }
1. Why does it clear the buffer? I mean, it's just a while loop that *I have no idea what is does, lol* - so please explain me what it does either
2. Why did he type void function(void) - why is the parameter is void? I've seen it before and never actually understood what it does.