title: How to give size of a structure array member in c at runtime
body: <p>I have a structure which looks like -</p>
  
  <pre><code>struct stack{
   int top;
   char string[size][80];
  }stackV;
  </code></pre>
  
  <p>I want to give user an option to allocate size of char string array at runtime.
  I had used scanf function to do this -</p>
  
  <p>I tried to achive it by doing -</p>
  
  <pre><code>int size=0;
   struct stack{
    int top;
    char string[size][80];
   } stackV;
  </code></pre>
  
  <p>But by doing this i got warning which says - variably modified 'string' at file scope</p>
  
  <p>Is there any way by which we can assign size to a structure member array .
  I can't create a structure inside any function because the structure member is used by other functions also.</p>