From the course: Complete Guide to C Programming Foundations

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Testing and converting characters

Testing and converting characters - C Tutorial

From the course: Complete Guide to C Programming Foundations

Testing and converting characters

- [Instructor] The C library comes with a host of functions that test and convert characters. These are often called the C-type functions after the header file name, ctype.h. The C-type functions that test characters are often referred to as the is functions, because their names begin with the letters I and S. The functions that manipulate characters are the to functions because their names begin with the letters T and O. Here are some of the common character testing functions. isalpha determines whether a single character is alphabetic, A to Z, upper or lowercase. isdigit returns true for the number characters 0 through 9. isupper and islower, they return true for upper and lowercase letters respectively. Character conversion functions include tolower, which converts an uppercase letter to its lowercase counterpart. The toupper function does the opposite. These functions taken integer character as an argument, and return the modified character value as an integer. This exercise file…

Contents