title: How to move through an array?
body: <p>I need to move an index though an array to put an random array in order. Here is my code. </p>
  
  <pre><code>void insertNumber(int randomNum, int data[], int size)
  {
      int i = 0;
      for(i = 0; randomNum &gt; data[i] &amp;&amp; i &lt;= size - 2; i++)
      {
  
      }
  
      for ( i = 0; i &lt; 10; i++)
              {
                  data[i+1] = data [i];
              } 
      data[i] = randomNum;
  }
  </code></pre>
  
  <p>Thank you for your time. It is an infinite loop I just don't know how to fix it.</p>