S
somenath
I have a question regarding the memory allocation of array.
For example
int array[10];
Now according to my understanding 10 subsequent memory location will
be allocated of size sizeof(int) *10 and this is done at compile
time.
Does it mean C compiler reserve some amount of memory for the array
at compile time?
That means with out the line of code being executed some amount of
memory is getting exhausted.
I think I am misinterpreting the idea of compile time memory
allocation.
Please provide some inputs to correct my understanding.
For example
int array[10];
Now according to my understanding 10 subsequent memory location will
be allocated of size sizeof(int) *10 and this is done at compile
time.
Does it mean C compiler reserve some amount of memory for the array
at compile time?
That means with out the line of code being executed some amount of
memory is getting exhausted.
I think I am misinterpreting the idea of compile time memory
allocation.
Please provide some inputs to correct my understanding.