Answer:
what language?
Explanation:
In Java:
import java.lang.reflect.Array;
public class Main {
public static void main(String[] args) {
int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
for (int i = 0; i < Array.getLength(arr); i++) {
System.out.println(arr[i]);
}
}
}
------------------------------------------------------------------------
Notice, the program is printing the value equivalent to the index at given moment, so if you array is made of String or other type that's not int, it will work the same.
Following are codes to the given question:
Code Explanation:
Code:
for (int i = 0; i < length; i++)//defining a for loop that holds array value and use print method that prints array value
cout<<names[i]<<endl;//print array value
Learn more:
brainly.com/question/15207448