When you use a subscript value that is negative or higher than the number of elements in an array, the resulting action depends on the programming language used.
Arrays cannot be used if you need to search a range of values. Parallel arrays are two or more arrays where each element in one array is associated with an element in the same relative position in the array or other arrays. An array index is out of range when it is not within the range of the acceptable index.
When you have an array with five elements and you use index 6, your index is said to be out of bounds. You can increase or decrease the loop control variable. You can improve the efficiency of your program by leaving the loop as soon as you find a match in the array. A negative index on the last line can generate a runtime error because it points to an address -256 possibly lower in memory than the origin of the array.
To learn more about array:
https://brainly.com/question/27015641
#SPJ1