int main(){
srand(time(NULL));
char lettere[8];
int valido = 0;
int i=0;
for(i=0; i<8; i++){
do {
lettere[i] = '!' + rand() % 'z';
if ((lettere[i] >='!' && lettere[i] < '&')
|| (lettere[i] >= '?' && lettere[i] <= '@')
|| (lettere[i] >= '0' && lettere[i] <= '9')
|| (lettere[i] >= 'a' && lettere[i] <= 'z')
|| (lettere[i] >= 'A' && lettere[i] <= 'Z'))
valido = 1;
} while(!valido);
printf("%c", lettere[i]);
}
}