title: Dynamic Array in a loop in C
body: <p>I want to create a code which'll store new arrays based on user demand and perform particular set of operations on it.  So, considering I don't really need to store that array once the operation is being done on it, I thought of overwriting that same array, but that's where I'm having problems.</p>
  
  <pre><code>int main() 
  {
      int i, T;
  
      scanf("%d", &amp;T);
      int res[T];//for T cases I'll have T outputs so saving it in an array
  
      for(i=0; i&lt;T; i++)
      {
          int size, j;
          scanf("%d", &amp;size);
          int ary[size];
          for(j=0; j&lt;size; j++)
          {
              scanf("%d ", &amp;ary[j]);
          }
          //In each case I'm just declaring an array and getting a result n storing in another array
          res[i]=fn(ary, size);//fn returns 1 if array forms Circular Prime else 0
      }
  
      for(i=0; i&lt;T; i++)
      {
          if(res[i]==1)
              printf("YES\n");
          else
              printf("NO\n");            
      }
      return 0;
  }
  </code></pre>