home *** CD-ROM | disk | FTP | other *** search
/ C++ for Dummies (3rd Edition) / C_FD.iso / CHAP02 / CHAP02_1.C next >
C/C++ Source or Header  |  1996-09-02  |  310b  |  26 lines

  1. // Chap02_1.c
  2. #include <ctype.h>
  3. void upperCase(char *pS)
  4. {
  5.    while (*pS)
  6.    {
  7.       if (islower(*pS))
  8.       {
  9.          *pS = toupper(*pS);
  10.       }
  11.       pS++;
  12.    }
  13. }
  14.  
  15. void fn()
  16. {
  17.    char *pString;
  18.    pString = "Davis";
  19.    upperCase(pString);
  20. }
  21. int main()
  22. {
  23.     fn();
  24.     return 0;
  25. }
  26.