Skip to main content
Logo image

Section 7.3 Upper- and Lower-Case Chars

Each letter in our alphabet has a lower-case and an upper-case version. Since we may be interested in converting from upper- to lower-case or from lower- to upper-case it is beneficial for us to examine whether there might be a pattern between the two ASCII codes that correspond to the lower- and upper-case versions of a given letter.
Have you found the pattern? If not, go back to the previous code window and keep experimenting until you do. Or take a close look at the ASCII table.

Activity 7.2.

Using the pattern you found, write a C program that first asks the user to enter a lowercase letter and then converts that letter to the corresponding uppercase letter and prints the letter (with no other text) out to the screen.

admin.....open in new window

What line of code did you add?