codice:char buffer[11]="\0"; unsigned int year; unsigned int month; unsigned int day; //vengono valorizzati day, month e year... year=2006; month=12; day=19; //Controlli di base if (year>9999 || year<1 || month>12 || month<1 || day>31 || day<0) { printf("Errore: dati non validi."); return 1; //Supponendo di essere in main(). } itoa(day,buffer,10); buffer[2]='/'; itoa(month,buffer+3,10); buffer[5]='/'; itoa(year,buffer+6,10); printf(buffer);