And if it neither a number nor a alphabet, like an underscore? Then what? Probably you should just check if it is a number. If not give an error message.
Another way, except using isalpha() is do something like this:
Code:
char initial;
//get character from user
if (initial < 'a' || initial > 'z' || initial > 'A' || initial < 'Z')
printf("ERROR\n");
Generally in the ASCII you will have 'a', 'b', 'c', ... , 'z' so everything between 'a' and 'z' is a letter. On another point in the table you have 'A', 'B', ..., 'Z' so everything between 'A' and 'Z' is a capital letter. The same goes for numbers.