int main()
{ int sample[10]; // this reserves 10 integer elements int t;
// load the array for(t=0; t<10; ++t) sample[t] = t;
// display the array for(t=0; t<10; ++t)
cout << "This is sample[" << t << "]: " << sample[t] << "\n";
return 0;
}
This is sample[0]: 0
This is sample[1]: 1
This is sample[2]: 2
This is sample[3]: 3
This is sample[4]: 4
This is sample[5]: 5
This is sample[6]: 6
This is sample[7]: 7
This is sample[8]: 8
This is sample[9]: 9