so far only loops, although one operator, until the condition is false. This should not be a compound statement (this thing: {}), it can be any statement .; it is a statement that does nothing.
while(getchar() != '\n');
will loop until you hit enter, for example. Although, this is bad practice, as it will lead the flow; adding a sleep method call in a loop is better.
source share