This is not possible in plain C, and often even not possible in general. The reason is buffering, input streams wait for a character (usually enter) to send data to processors (like scanf, gets, getchar, ...). First of all, stdin itself is buffered. You can turn this off by using setvbuf: setvbuf ( stdin, NULL, _IONBF, 0)
, which I however do not recommend. This also means you have to handle backspaces and other control characters yourself, ugly stuff (use telnet for some time if you want to know how painful this is).
Secondly, the terminal you work in will often also use buffers, even if you put off buffering in C, this one will buffer until enter is hit. You can try to find system-specific ways to disable buffering here also, but as far as I know these do not exist for every system/terminal.
If you want to control output on this level, system specific API's or even creating custom consoles will be necessary.