C++ examples for Statement:for
A for Loop Over an Array
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { unsigned int array[10]; //ww w .ja va2s .c om for (unsigned int i=0; i<10; ++i) { array[i] = i * 2; cout << "Loop Iteration: " << array[i] << endl; } return 0; }