So in my book they gave this example of how to control the garbege from scanfI understand the fact that it skips to the next whitespace in STDIN queque . what I don't understand is how when I try to get the garbege out withCode:ex: while ( (scanf("%d", &input) !=1) scanf("%*s");nothing seems to come out..Code:while ( (ch = getchar())!='\n') printf("%c is not an integer", ch);
how is it that the buffer seems to be cleared out. I thought the "*" operator only skipped over it. isn't it still in the buffer when it skips over, or does it just ignore the input period and doesn't read anything.