title: Pass char pointer array to function
body: <p>I'm trying to pass an initialized char pointer array to a function. I can't seem to figure out why the function will only print out the numeric digits of each element in the array.</p>
  
  <p>Does anyone know how I can print each string element from the passed in pointer array?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;stdlib.h&gt;
  
  void sort(char *);
  
  int main()
  {
     char *states[4] = {"Florida", "Oregon", "California", "Georgia"};
  
     sort(*states);
  
     return 0;
  }
  
  void sort(char *states)
  {
     int x;
  
     for (x = 0; x &lt; 4; x++) {
        printf("\nState: %d\n", states[x]); //only this will compile
        //printf("\nState: %s\n", states[x]); //need to print this.
     }
  
  }
  </code></pre>