title: Traverse chars in String for Analysis in C
body: <p>Ok so the method <code>myName()</code> is totally wrong. I'm new to coding in C. Somehow I need to traverse the string <code>*theName</code> so that I could evaluate each char in it. And I need to do this while keeping <code>char *name[1] = {David $ MN % Baez}</code> as a songle index array. Help I'm stuck!    </p>
  
  <pre><code> #include &lt;stdio.h&gt;
  
  
  int main()
  {
      char *name[1] = {"David $ MN % Baez"} ; // should work
  
      myName(name) ;  
      return 0 ;
  }
  void myName(char *theName)
  {
      for(int i = 0; i &lt; sizeof(theName); i++)
      {
          if("aeiouAEIOU".IndexOf(theName) &gt;= 0)/////// is vowel
          {
               printf("character [ %c ] located at position %d is a vowel", theName[i], i);
          }
  
  
          if(theName == ' ')//////
          {
              printf("character [ %c ] located at position %d is a space", theName[i], i);
          }
  
          else if(theName == '$' || theName == '%')/////////////////////
          {
              printf("character [ %c ] located at position %d is a symbol", theName[i], i);
          }
  
          else
          {
              printf("character [ %c ] located at position %d is a consonant", theName[i], i);
          }
  
      }
  }
  </code></pre>