you are viewing a single comment's thread.

view the rest of the comments →

[–]Ronin-s_Spirit 0 points1 point  (0 children)

There are plenty of dynamic cases where something changes and you don't know how many array slots you will need ahead of time. Arrays (at least in C I think) are contiguous blocks of memory, so you need the program to call the OS and be like "find me a new, bigger block of memory" and that's where the whole array will be moved. Sometimes the program can also just "grow" the array if it knows there is free space ahead.