title: Reverse an array in c
body: <p>I checked some videos of reversing an array in C therefore I know that my logic is correct. Here's my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  void reverse( int arr[], unsigned int len )
  {
  int i=0;
  int n=len;
  int j=len-1;
  int temp;
  
  while (i&lt;n) 
      {
          temp=arr[i];
          arr[i]=arr[j];
          arr[j]=temp;
          i++;
          j--;
      }
  }
  
  void reverse( int arr[], unsigned int len ); 
  
  int main( void )
  {
    int a[] = {11, 19, 13};
    unsigned int len = 3;
  
    reverse( a, len );
  
    int k=0;
    for( k=0; k&lt;len; k++ )
    {   
       printf( "%d ", a[k] );
    }
    printf( "\n" ); 
  
    return 0;
  }
  </code></pre>
  
  <p>It outputs the same array. I couldn't find where the problem is. Should  I return something for the <code>reverse</code> function?</p>