title: C How to Capitalize character after punctuation mark without Arrays?
body: <p>I am very new to the C programming language and was curious how would you capitalize a letter in a program following a punctuation mark without using an array. I tried using the ASCII code values by subtracting 32 but it just doesn't seem to work in my code. Here is a portion of my code that outputs the letters. I thought word = word - 32 would work but it does nothing when running the program. I'd appreciate the help!</p>
  
  <pre><code>while ((word = getchar()) != EOF &amp;&amp; word != '\n'){
          if (word == ' ' || word == '.' || word == '?' || word == '!' || word == '(' || word == ')' || word == '*' || word == '&amp;' || word == ';' || word == ':'){
              printf("\n");
              word = word - 32;
          }
  
          if ((word &gt;= 'A' &amp;&amp; word &lt;= 'z')){
              printf("%c", word);
          }
  
      }
  </code></pre>