title: C get odd numbers between a range and store it in int array
body: <p>this function is supposed to store odd numbers between <code>l</code> and <code>r</code> inclusive in an array of ints. <code>result_count</code> is for </p>
  
  <ul>
  <li>Store the size of the array to be returned in the <code>result_count</code> variable</li>
  <li>Allocate the array statically or dynamically.</li>
  </ul>
  
  <p>I don't know what to do inside the if condition. I tried this:</p>
  
  <pre><code>int* oddNumbers(int l, int r, int* result_count) 
  {
      int i;
      for (i = l; i &lt;= r; i++)
      {
          if (i%2 == 1)
          {
              i = result_count[i];
          }
      }
      return result_count;
  }
  </code></pre>