Step 5 of 6
Characters are numbers
Because chars are small numbers, you can do math on them. Letters 'a' to 'z' are consecutive, so 'a' + 2 is 'c', and c - 'a' gives a letter's position in the alphabet.
<ctype.h> has helpers: isdigit(c), isalpha(c), isupper(c), toupper(c), tolower(c).
Your turn: write void to_upper(char s[]) that converts every lowercase letter in the string to uppercase in place. Leave other characters alone.
Previous: Compare strings correctly Next: Challenge: palindromes