scanf

Terminating scanf programically in C language.

Well, I'm programming using C language on a Linux OS. I'm writing a program that scans an input from the user. However, I want the scanf to have a certain time limit. For example, if the user does not enter anything on the keyboard withing 10 seconds, it will skip the scanf and go to the next line. I'm using alarm(10) to wait for 10 seco...