|
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:
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:
|
||||||||
| Index || Doubts / Clarifications || Related Topics || Web Links | ||||||||