I'm trying to parse a string (polynomial function) for my program. Are these conditions allowed for if and while?

if (a >= '0' && a <= '9') ---> checks if char is a number
if ( a>= 'A' && a <= 'Z') ---> checks if char is a letter
if (a >= 'a' && a <= 'z')


while(r[i] != '\0') ---> repetition for all the characters.