answersLogoWhite

0

There are many limitations of arrays. The greatest advantage of an array of course is performance. Arrays are by far the fastest means of referencing collection of items.

That said, arrays suffer incredible limitations since they are generally very slow for adding items in a sorted manor. Unless you preallocate a large enough area of memory to store all possible items you wish to use, arrays have to be reallocated over and over. There are some hackish functions which can be used to exploit the MMU of the system to grow arrays by creating multiple logical contiguous regions of memory, but if this is performed on a fine grain, the logical descriptor tables of the system will grow and overall system performance will be negatively impacted.

Even though you appear to want to program plain-C, there is no reason you can't develop in an object oriented manor. There are many libraries available for C which provide high-performance variable length collections. I am not familiar with all of them, but as part of the GNOME toolkit, there is GLib (if I recall) which provides excellent implementations of many of them. Alternatively, if you're interested in learning how they work in order to correctly choose the right one for each task, you may want to get a copy of Donald Knuth's "The Art of Computer Programming, Volume 1" which is effectively a bible of sorts on this specific topic and is quite easy to read.

If you want to learn the ABCs and 123s without an overly prolonged investment in time, I recommend experimenting with an object oriented language with good class libraries like Java or my favorite, C#. They are both great starting points for experimenting with data structures.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you overcome the disadvantages of water?

look at the advantages


What are thetwo disadvantages of this concept in determining consumer behaviorand how are these disadvantages overcome?

What are some disadvantages or advantages in chemical energy?


What are thetwo disadvantages of the concept of diminishing marginal utility in determining consumer behaviorand how are these disadvantages overcome?

The answer is, Penis.


What is multidimentional array?

Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.


What is a multidimentional array?

Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.


What is a PHP function that can sort arrays by other arrays?

You cannot sort arrays by other arrays; that wouldn't make sense, anyway.


What do arrays eat?

Arrays are reported to be omnivoire.


How do you find the difference between two arrays in Java?

for arrays you can list the different arrays and what attributes that you give to them.


Arrays whose size can be altered are known as?

Arrays whose size can be altered are known as dynamic arrays.


What are the types of arrays and syntax?

Arrays can be of following types.


Friction is inveitable but it has disadvantages why?

Friction is a force that must be overcome for no useful purpose. It takes energy to do this, and thus is wasteful.


What do we call the numbers that cannot be arranged into 2-row arrays?

we can call the number that cannot be arranged into 2- row arrays multiple arrays.