title: Declare global array from function in C
body: <p>Maybe this question is answered somewhere but i can't find it. I want to declare global array. But the size of this array depends on my input.How do i do that ?, Thank you</p>
  
  <p>Idea is:</p>
  
  <pre><code>char* array[maxsize];
  
  int main(){
      int maxsize;
      scanf("%d",&amp;maxsize);
  }
  </code></pre>
  
  <p>EDIT: What if an array is 2D array ? </p>