| <<< Elements of an Array | Index | Array Initializer >>> |
#include <iostream>
using namespace std;
int main()
{
const int SIZE = 5;
char carr[ SIZE ]; // array of five characters
for ( int idx = 0; idx < SIZE; ++idx ) {
carr[ idx ] = 'A' + idx; // change element value
cout << carr[ idx ]; // display element value
}
return 0;
}
| <<< Elements of an Array | Index | Array Initializer >>> |