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: 
`<ctype.h>` includes a range of functions for determining if a `char` represents a letter or a number, such as `isalpha`, `isdigit` and `isalnum`.

The reason why `int a = (int)theChar` won't do what you want is because `a` will simply hold the integer value that represents a specific character. For example the ASCII number for `'9'` is 57, and for `'a'` it's 97.

Also for ASCII:

* Numeric - `if (theChar >= '0' && theChar <= '9')`
* Alphabetic -   
 `if (theChar >= 'A' && theChar <= 'Z' || theChar >= 'a' && theChar <= 'z')`

Take a look at an [ASCII table](http://www.asciitable.com/) to see for yourself.
Neither of these does anything useful. Use `isalpha()` or `isdigit()` from the standard library. They're in `<ctype.h>`.