The way to do it in Turbo C is to use the functions kbhit()
and getch()
. You will not be using the scan functions because they will stop the program.
Anyway, you should never use the scanf()
to read a string. Here's why. It would be useful to read the entire series on the function so you can head off any problems now before using scanf()
drives you crazy.