title: How to reverse an array and store the values of the reversed array in a new array
body: <p>My program needs to do the following: </p>
  
  <ol>
  <li>Reverse a array(f.e. <code>niz[] = { 2, 4, 5, 7, 4, 8, 3 }</code> needs to become <code>niz[] = { 3, 8, 4, 7, 5, 4, 2 }</code></li>
  <li>Store the values of a reversed array into a brand new array</li>
  <li>All of it has to be done without using <code>printf</code> inside the function that reverses the array and stores the values into the new array. Also, the array and its size need to be predefined (so no user input).</li>
  <li>The result (in this case the new array that contains the reversed values of the previous array) needs to be printed in <code>main</code></li>
  </ol>
  
  <p>However, instead of reversing the array and storing it into a new array and returning it. The program always prints the following numbers:</p>
  
  <pre><code>6356668
  </code></pre>
  
  <p>So does anyone see the problem in my code?</p>
  
  <pre class="lang-c prettyprint-override"><code>int koko(int *array, int *array2, int c, int d) {
      for (c = 6; c &gt; -1; c--, d++) {
          array2[d] = array[c];
      }
      return array2;
  }
  
  int main() {
      int niz[] = { 2, 4, 5, 7, 4, 8, 3 };
      int niz2[7];
      int a, b, c;
      c = koko(niz, niz2, a, b);
      printf("%d", c);
  }
  </code></pre>