Puoi usare la

scanf("%s", s);

al posto della fgets ... ma quest'ultima e' piu' sicura ...