title: Can one element in struct access another element of itself in C?
body: <p>I want to declare a int num in struct S. Then the same struct should also have a array B of size num(So <code>B</code> will access <code>num</code> from it's own struct).</p>
  
  <p>while in a function, I can do,</p>
  
  <pre><code>func(int A)
  {
      int max=A; //I could use A directly, I am just trying to explain my plan.
      int B[max];
  }
  </code></pre>
  
  <p>same won't work for struct as such,</p>
  
  <pre><code>struct S {
      int num;
      int data[num]; //this is wrong, num is undeclared
  };
  </code></pre>
  
  <p>Is there any way I can do this?</p>