title: Returning array[] from void, C
body: <p>So when I write a function</p>
  
  <pre><code>void sort (int oldarray[], int length)
  {
  
  //imagine there is a function here that runs a loop and finishes with a sorted:
  
  newarray[];
  }
  </code></pre>
  
  <p>How do I get newarray[] to replace oldarray[] in the main function that could look like this:</p>
  
  <pre><code>int main()
  {
  int length = 7
  int oldarray[length]
  
  //here would be a loop that populates the oldarray
  
  sort(oldarray[], length)
  
  //a loop that prints the newarray[] from the sort or main function
  }
  </code></pre>
  
  <p>FYI this isn't homework. I'm teaching myself, so you aren't helping me cheat a professor out of their hard earned money.</p>