An array is a fixed-size sequenced collection of elements of the same data type.It is simply a grouping of like-type data.In its simplest form,an array can be used to represent a list of numbers,or a list of names.
an array is a sequence collection of related data items that shear a common name.For instance,we can refer to the individual salaries of a group of employees in an organization.we can refer to the individual salaries by writing a number called index or subscript in brackets after the array name.For example,represents the salary of the 10th employee.while the complete set of values is referred to as an array,individual values are called elements.
The ability to use a single name to represent a collection of items and to refer to an item by specifying the item number enable us to develop concise and efficient programs.
we can use arrays to represent not only simple lists of values but also tables of data in two or three or more dimensions.the following types of arrays.
- One-dimensional arrays
- Two-dimensional arrays
- Multidimensional arrays
No comments:
Post a Comment