Yes, every time you call getchar() , it will read the next character (assuming the next character is read).
Quote C11 , chapter ยง7.21.7.6
The getchar() function returns the next character from the input stream pointed to by stdin .
If there is nothing valid to read,
If the stream is at the end of the file, the end-of-file indicator for the stream is set and getchar returns EOF . If a read error occurs, an error indicator for the stream is displayed and getchar returns EOF .
source share