title: Using toupper on char returns the ascii number of the char, not the character?
body: <pre><code>int main()
  {
  
  char hmm[1000];
  
  cin.getline(hmm, 1000);
  cout &lt;&lt; hmm &lt;&lt; endl;    //this was to test if I could assign my input to the array properly
  for (int sayac = 0; hmm[sayac] != '@'; sayac++) {
      if (!isdigit(hmm[sayac])) {
          if (islower(hmm[sayac])) 
              cout &lt;&lt; toupper(hmm[sayac]);
          else if (isupper(hmm[sayac]))
              cout &lt;&lt; tolower(hmm[sayac]);
          else
              cout &lt;&lt; hmm[sayac];
      }
  }
  </code></pre>
  
  <p>"Write a program that reads keyboard input to the @ symbol and that echoes the input
  except for digits, converting each uppercase character to lowercase, and vice versa.
  (Don’t forget the cctype family.) "</p>
  
  <p>I'm doing this exercise from the primer book. But when I run it, it returns the ascii order of the char, not the uppercase/lowercase version of the character. Couldn't figure out the problem. Can someone tell my why please?</p>
  
  <p>(I may have other problems about the exercise, please don't correct them if I have. I want to fix it on my own (except the problem I explained), but I can't check the other ones as I have this problem.</p>