There is more to this than just getchar(). The terminal driver must be put into character mode and buffering must be disabled. See this post.
There is more to this than just getchar(). The terminal driver must be put into character mode and buffering must be disabled. See this post.