C++ for


Example

Introduces a for loop or, in C++11 and later, a range-based for loop.

// print 10 asterisks
for (int i = 0; i < 10; i++) {
    putchar('*');
}