Logout

5.1.19

Compare the use of static and dynamic data structures.

 

Teaching Note:

LINK One-dimensional arrays.

 

Sample Question:

sdfsdfsf

JSR Notes:

A static structure cannot change its size; i.e. it can not increase nor decrease the amount of space it takes up in computer memory. So static structures have the disadvantage over dynamic structures of not being able to grow or shrink in size. Therefore when declaring a static structure (like an array), you have to make it as big as you think it may possibly get, and this wastes memory. Whereas a dynamic structure will always only take up as much memory as that data needs.