0
when is memory allocated for an array?
4 Antworten
+ 2
Upon creation (via 'new') the data is stored on the heap during run time.
+ 1
compile time.
and not runtime as some others have answered.
Memory is allocated during runtime only when we manually allocate memory as and when required.
- 1
When you create it and the size is therefore known.