CS561-SPRING 2002

TOPIC:CS105-ARRAYS

 

Arrays can be broadly classified into two types 

1] Static arrays using fixed memory blocks

2] Dynamic arrays using linked list (singly linked or doubly linked lists) 

                               The static array is one where the size of the array is predetermined and is fixed. This declaration is done at the compile time of the program and is flexible in its size and type of data it contains depending on the user definitions and requirements.

                                Whereas on the other hand the dynamic array is one that is created in the run time of the program and the size of this array is determined as per the requirements while executing that particular application or program. Here it is possible to add new entries to the array till memory is available, whenever required, while the execution of the program is in effect.

                                 Arrays can be created by reserving fixed amount of memory blocks to be used for some purpose or can be dynamically created during run time using singly linked lists or doubly linked lists as and when required.                       

1] Static (fixed memory blocks/compile time definition).

2] Dynamic (linked lists/run time definition).

 

<=PREV                                       HOME                                               NEXT=>