scanf getchar function is skipped

It’s because scanf will leave a '\n' (endline) symbol in the input buffer. This symbol will be consumed by getchar at the first iteration of this while(1) loop.

Leave a Comment