C++ examples for Data Type:Array
Using a Loop to Loop Through the Array
#include <iostream> using namespace std; int main()/* www. java 2 s. c o m*/ { int myArray[5]; for (int i=0; i<5; i++) { myArray[i] = i * 2; cout << myArray[i] << endl; } return 0; }