Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

List->Static List->Concept

I haven't as yet told you about what actually a list is and so, here it goes...literally speaking, a list is nothing but a collection of similar data; means when you don't just deal with one or two variables of same type (for ex. int, char, etc) but you have a bulk of data of same type (may be all int or char or anything). To deal with such enormous amount of data, as you can even imagine, nobody will use regular variables (which can hold only one data at a time) and only solution lies in a LIST.

In C, we have ARRAY to serve the purpose and that's why its a LIST. Well, I am not here to discuss the ARRAY but we will still see how an array acts as a STATIC list.

STATIC LIST:
Let us assume, you have the following data -- 12, 34, 56, 65, 23, 100 (all integers). Now, when you store these in an array, let's say of size 6, the array is full and looks like this -- 

12 34 56 65 23 100

Now, at the run-time (while your program is running) if you want to add, let's say, 200. I ask you, can you do it?............No, you can't, as that will make the array overflow (out of allotted space).

So, by now you know why do we call it a STATIC list. Well, people still use such data structures when they know the upper bound of their data. One more important point, that's when you have lesser data than your allotted array size, you waste system's memory.

Related Operations:
Addition and Deletion of elements
Traversing of list
Searching for a particular Key
Sorting of list in ascending and descending order


Index || Doubts / Clarifications || Related Topics || Web Links