What does scanf REMOVES from input after scanning?
问题 I have gone through many questions and blogs and books, but I guess I'm just not able to relate things properly. What does scanf do after scanning? It reads everything except space, tab and newline, but what does it do to newline?? I'm unable to remove newline any way after scanning input. For example, consider this as input:- 5 Abcdefgh Now, I have scanned 5 as integer, scanf("%d", &i); but how do I remove '\n' in order to read everything ahead one character at a time? I want to use:- while(