The following functions alter a given character:
int
digittoint(int c); // convert char to its number value
int
tolower(int c); // convert to lower case
int
toupper(int c); // convert to upper case
These functions return the changed character, or the original character if the conversion is not necessary or not valid.
There are also other functions available in ctype.h. They have been omitted for simplicity. Some deal with non-ASCII characters; others deal with eclectic groupings of characters. If you are interested in learning more, you can explore ctype.h on your computer system.
We will see some of these functions in action later in this chapter after we introduce strings. However, before we move on to strings, let's take a first pass at creating the ASCII table shown earlier in this chapter. We will...