title: New to GCC - running a array insertion gives me different output locally than on online compiler
body: <p>I am going through a TuturialsPoint algorithm and trying to run the C code with GCC. Would anyone know why my local output would be different that what is produced by an online C compiler?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  main()
  {
      int LA[] = {1, 3, 5, 7, 8};
      int item = 10, k = 3, n = 5;
      int i = 0, j = n;
  
      printf("The original array elements are :\n");
  
      for (i = 0; i &lt; n; i++)
      {
          printf("LA[%d] = %d \n", i, LA[i]);
      }
  
      n = n + 1;
  
      while (j &gt;= k)
      {
          LA[j + 1] = LA[j];
          j = j - 1;
      }
  
      LA[k] = item;
  
      printf("The array elements after insertion :\n");
  
      for (i = 0; i &lt; n; i++)
      {
          printf("LA[%d] = %d \n", i, LA[i]);
      }
  }
  </code></pre>
  
  <p>Expected output (from online gcc compiler)</p>
  
  <pre><code>The original array elements are :
  LA[0] = 1 
  LA[1] = 3 
  LA[2] = 5 
  LA[3] = 7 
  LA[4] = 8 
  The array elements after insertion :
  LA[0] = 1 
  LA[1] = 3 
  LA[2] = 5 
  LA[3] = 10 
  LA[4] = 7 
  LA[5] = 8 
  </code></pre>
  
  <p>My local output: </p>
  
  <pre><code>The original array elements are :
  LA[0] = 1
  LA[1] = 3
  LA[2] = 5
  LA[3] = 7
  LA[4] = 8
  The array elements after insertion :
  LA[0] = 1
  LA[1] = 3
  LA[2] = 5
  LA[3] = 7
  LA[4] = 8
  LA[5] = 6
  </code></pre>
  
  <p>I am using gcc version 8.2.0 (MinGW.org GCC-8.2.0-5)</p>