#include <stdio.h>
#include <signal.h>
#include <unistd.h>
void sigint_handler(int sig) {
printf("Ouch! That tickles!\n");
}
int main() {
signal(SIGINT, sigint_handler);
printf("Try pressing Ctrl+C to stop this program!\n");
for (int i = 0; i < 10; i++) {
printf("You have %d second%s to wait...\n", 10 - i, i == 9 ? "" : "s");
sleep(1);
}
return 0;
}