Question: How do I determine if a `char` in C such as `a` or `9` is a number or a letter?

Is it better to use:

```
int a = Asc(theChar);

```

or this?

```
int a = (int)theChar

```

Answer: 
Neither of these does anything useful. Use `isalpha()` or `isdigit()` from the standard library. They're in `<ctype.h>`.
**C99 standard on `c >= '0' && c <= '9'`**

`c >= '0' && c <= '9'` (mentioned [in another answer](https://stackoverflow.com/a/8611845/895245)) works because [C99 N1256 standard draft](http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf) 5.2.1 "Character sets" says:

> 
> In both the source and execution basic character sets, the
>  value of each character after 0 in the above list of decimal digits shall be one greater than the value of the previous.
> 
> 
> 

ASCII is not guaranteed however.