how to check if a number is a number in c code example
Example 1: how to know if a number is even in c
if((x & 1) == 0)
printf("EVEN!\n");
else
printf("ODD!\n");
Example 2: c check if char is number
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?");
}