title: Dynamic array with random numbers
body: <p>I create Array with size N in cycle "for" and fill up random numbers.I have <strong>startPoint</strong> which means first size of array. <strong>endPoint</strong> it's end size, but <strong>step</strong> is step of size :)</p>
  
  <pre><code>for(int n = startPoint; n &lt;= endPoint; n += step)
  {
      int * Array = malloc(sizeof(int)*n);//Create dynamic array wit size n
  
      generationNumber(Array,n);// Function which generate random numbers and write to array
  
      printArray(Array,n);//Here I print array to cmd
  
      Executing(Array,n);//Here I execute some action with array, it's not important  
  
      free(Array);
  }
  </code></pre>
  
  <p>So my problem is in results:
  <a href="https://i.stack.imgur.com/yP4HL.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>It's a function <strong>generationNumber</strong>:</p>
  
  <pre><code>void generationNumber(int * Array, int n)
  {
       srand((unsigned)time(NULL));
  
       for(int i = 0; i &lt; n; i++)
       {
          Array[i] = rand()%1000;
       }
  </code></pre>
  
  <p>}</p>
  
  <p>Why numbers are repeated? I feel that just add numbers to array.</p>