title: How to find the size of dynamic array
body: <p>Is there any way I could find how much bytes are allocated for <code>RandomArray</code> in this code</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  
      int main()
      {
      int *RandomArray;
      int n;
      srand(time(NULL));
  
      RandomArray=malloc(sizeof *RandomArray * (rand()%11));
      printf("%d  %d",sizeof(RandomArray),sizeof(*RandomArray));
  
      return 0;
      }
  </code></pre>
  
  <p>Also I don't know whether above code will ever have any kind of practical usage. But I am looking from programming perspective.</p>