I need to use a 2D array of chars. The first field (rows) is set at 20480. The second field (columns) needs to be set at runtime (4096 being one possible value). The size of the 2D array will be too big to fit on the stack, so it needs to be global, putting it on the heap. It is also too large to be created dynamically with a call to malloc(). I can't seem to find the syntax I need to declare a global array, then set the size of it at runtime.

Once it is created, I will then need to set every element in the array, then come back and access every element in the array.

Also, would something like this work for accessing the array?
Code:
/* set each value */
int i, j;
for(i = 0; i < 20480; i++)
{
   for(j = 0; j < columns; j++)
   {	
      array[i][j] = 'a';	
   }
{

/* access each value */
char a;
for(i = 0; i < 20480; i++)
{
   for(j = 0; j < columns; j++)
   {	
      a = array[i][j];	
   }
{