📅  最后修改于: 2022-03-11 15:04:41.584000             🧑  作者: Mango
char c = 'a'; // or whatever
if (isalpha(c)) {
puts("it's a letter");
} else if (isdigit(c)) {
puts("it's a digit");
} else {
puts("something else?");
}