9. Character Functions

#include <stdio.h>
#include <ctype.h>

  int c; // must use int with getchar, not char

  c = getchar(); // reads one character,
                 // returns the character or a negative value if it fails

  c = toupper( c); // convert c to upper-case

  putchar(c); // write c as a character
ctype.h character functions:
  isalnum           isdigit           isprint           isupper
  isalpha           isgraph           ispunct           isxdigit
  iscntrl           islower           isspace

  tolower
  toupper
Practice!