#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <sys/types.h>

int main(void) {
	char s[100];
	fd_set fs={0};
	printf("Geben Sie innerhalb von 10 Sek. etwas ein: ");
	select(1,&fs,0,0,(struct timeval[]){{.tv_sec=10}});
	if (FD_ISSET(0, &fs))
        scanf("%99[^\n]",s);
    else
        puts("Timeout");
	
	return 0;
}
