title: C Code to count how many letters in a word
body: <p>I made simple code to count how many letters in a word, for some reason the variables <code>letters</code> is not consistent, here is the code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      char str;
      int slen(char *str)
      {
          int i;
          int letters=0;
          for(i=0;i&lt;30;i++)
          {
              if((str[i]&gt;='A'&amp;&amp;str[i]&lt;='Z')||(str[i]&gt;='a'&amp;&amp;str[i]&lt;='z'))
                  letters++;
          }
          return letters;
      }
      printf("%d \n", slen("Word"));
  }
  </code></pre>
  
  <p>The variable <code>letter</code> here prints 22.</p>