Please provide sufficient context, either by quoting or by describing
the parts you are answering to.
<OP wants to know whether getchar() has always to "wait" for '\n' or
whether there are implementations where getchar() works unbuffered>
I think you'd better say what operating system and C compiler you have.
I use Bloodshed Dev-C++ on Win32 platform. There after read character
with getchar user has to press enter.
As stated by others, the behaviour of getchar() depends on the
behaviour of stdin. stdin seems to be line-buffered rather than
unbuffered for interactive devices in your case.
If you want just read character
and without enter pressing continue in program, use command getche()
(conio.h library). it has the same use as getchar ;o))
You suggest that the OP uses an implementation specific way of reading
in characters from stdin unbuffered. This may not always be possible
due to external (e.g. hardware) restrictions.
I suggest the use of a macro or function wrapping the implementation
specific part -- this way, you can change the actual way of doing this
"under the hood" without affecting the rest of the program.
In addition, if you have wrapped the input and output parts, you can
even more easily adapt to different implementations. Your programme
itself then calls only "obtainAnswerCharacterFromUser()", for example,
and it does not play a role whether this is typed in via keyboard
followed or not followed by hitting the enter key or chosen from a
display via mouse or pen or ...
Cheers
Michael