Describe how items in the array might be searched for or sorted. How might array applications be useful in your everyday work?
I am lost on this and need a response of 200 word or more.
Thank you© BrainMass Inc. brainmass.com July 18, 2018, 10:52 am ad1c9bdddf
Multiple instances of the same type of items are contained in array. Instead of declaring multiplescalar variables of the same type, you declare only one array variable which contains multiple instances of the items. This greatly simplifies manipulation of the items.
For instance, one can create an array of test scores for all students in a class and then can easily:
- Calculate average score of the class
- Print the scores
- Sort the scores
Accessing an array element (an item) is via index of the item, for instance a would indicate the fourth (if 0-based index is used) item in array a.
There are well known sorting algorithms based on array notation.
One array can have many elements, and each element can hold a single value, such as text or numbers, or another array. An array containing other arrays is known as a multidimensional array.
After you have the information as an array, you can do a number of ...