CS561-SPRING 2002

TOPIC:CS105-ARRAYS

An array is an ordered collection of similar type of data.

                In any data base, we have a very varied grouping of different types of data, there are integers, floating point numbers, double sized data, characters and special data like alphanumeric strings. In the simple case of having to deal with small amounts of data, arrays are very suitable to deal with the storage and retrieval of such itemized data for manipulation.

Mixed data in database

879         654.656984           a#5649erg  98.30002

                 erjog87jqfu7        address         SSN

#1213              NAMES        %$^!@$$%&  65897

                           Now, considering the fact that all the data has to be assorted for meaningful use, the data can now be separated as floating point numbers, integers, characters etc.

Float===> 654.656984, 98.30002, ............., ***

Integer==>879,65897,...............,***

Characters==>NAMES,erjog87jqfu7,.........,%$^!@$$%&,......#1213,.....,***

                               The above examples are only intended to give a descriptive idea of the storage schema followed when using arrays. It is also possible to have pointers to the data in the arrays, when we use the different types of parameter passing, that is pass by value or reference, when function calls are made and data is to be passed along with the function call.

                          Here we follow the usual notation of array addressing, that is the first element in the array is considered to be in the zero(th) position.

<=PREV                                      HOME                                NEXT=>