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 - 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
-
-
-
-
-
-
-
-
-
Using single character I/O3m 32s
-
(Locked)
Testing and converting characters3m 15s
-
(Locked)
Challenge: Character I/O and conversions34s
-
(Locked)
Solution: Character I/O and conversions1m 37s
-
(Locked)
Understanding strings in C2m 46s
-
(Locked)
Fetching string input3m 45s
-
(Locked)
Sending string output3m 41s
-
(Locked)
Challenge: Using printf placeholders1m 9s
-
(Locked)
Solution: Using printf placeholders1m 59s
-
(Locked)
Exploring string functions2m 41s
-
(Locked)
Manipulating strings2m 57s
-
(Locked)
Chapter challenge: Reading commands1m 52s
-
(Locked)
Chapter solution: Reading commands2m 31s
-
-
-
-
-