Scanf is not waiting for input
问题 I know scanf waits for input. But in this program I have written it is printing hello in an infinite loop. Its not waiting for me to enter. #include <signal.h> #include <stdio.h> #include <string.h> #include <sys/time.h> #include<unistd.h> void timer_handler (int signum) { static int count = 0; printf ("timer expired %d times\n", ++count); } int main () { struct sigaction sa; struct itimerval timer; memset (&sa, 0, sizeof (sa)); sa.sa_handler = &timer_handler; sigaction (SIGALRM, &sa, NULL);