title: Logic challenge: sorting arrays alphabetically in C
body: <p>I'm new to programming, currently learning C. I've been working at this problem for a week now, and I just can't seem to get the logic straight. This is straight from the book I'm using:</p>
  
  <blockquote>
    <p>Build a program that uses an array of strings to store the following names:</p>
    
    <ul>
    <li>"Florida"</li>
    <li>"Oregon"</li>
    <li>"Califoria"</li>
    <li>"Georgia"</li>
    </ul>
    
    <p>Using the preceding array of strings, write your own <code>sort()</code> function to display each state's name in alphabetical order using the <code>strcmp()</code> function.</p>
  </blockquote>
  
  <p>So, let's say I have:</p>
  
  <pre><code>char *statesArray[4] = {"Florida", "Oregon", "California", "Georgia"}; 
  </code></pre>
  
  <p>Should I do nested for loops, like <code>strcmp(string[x], string[y])...</code>? I've hacked and hacked away. I just can't wrap my head around the algorithm  required to solve this even somewhat efficiently. Help MUCH appreciated!!!</p>