user27998
6
Q:

c check if char is number

char o = '+';	//Or some other character

if (o == '%' || o == '/' || o == '*' || o == '+' || o == '-') {
	//Do something
    //...
}
0
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?");
}
0

New to Communities?

Join the community