Faccio notare inoltre che la getchar() restituisce un int e non un char . Questo per tenere conto del valore EOF . Saluti