string keyword = argv[1];
for(int i = 0; i<= strlen(keyword); i++)
{
if(!isalpha(keyword[i]))
{
printf("error\n");
return 1;
}
else
{
break;
}
}
when there is a non-alphabetical character, after an alphabetical character in argv[1], for example, ./vigenere word1
it doesn't print the error or return 1
but, if the non-alphabetical character is before the alphabetical character in argv[1], for example ./vigenere 1word
it prints the error and returns 1.
I'm not sure how to fix this problem.