title: Warning: array subscript has type char
body: <p>When I am running this program I am getting warning "array subscript has type 'char'".
  Please help me where is it going wrong. I am using code::blocks IDE</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;math.h&gt;
  #include &lt;string.h&gt;
  void NoFive()
  {
      long long int cal;
      char alpha[25];
      char given[100] = "the quick brown fox jumped over the cow";
      int num[25];
      int i, k;
      char j;
      j = 'a';
      k = 26;
      cal = 1;
      for(i = 0; i &lt;= 25; i++)
      {
          alpha[i] = j++;
          num[i] = k--;
        //  printf("%c = %d \n", alpha[i], num[i]);
      }
      for(i = 0; i &lt;= (strlen(given) - 1); i++)
      {
          for(j = 0; j &lt;= 25; j++)
          {
           if(given[i] == alpha[j]) ***//Warning array subscript has type char***
           {
              cal = cal * num [j]; ***//Warning array subscript has type char***
           }
           else
           {
  
           }
          }
      }
  printf(" The value of cal is %I64u ", cal);
  }
  
  main()
  {
  NoFive();
  }
  </code></pre>