#include #include #include using namespace std; int main ( int argc,char * argv[]){ int a[20] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; int back = 100; long int b[100] = {0}; for(int * ptr = a, *last = a + 20; ptr < last; ptr++){ cout << *ptr << endl; *ptr = back--; } cout << "Section 1 finished " << endl << endl; for(int * ptr = a, *last = a + 20; ptr < last; ptr++){ cout << *ptr << endl; } cout << "Section 2 finished " << endl << endl; for(long int *ptr = b, *last = b + 100, val=0; ptr < last; ptr++, val++){ *ptr = val; } cout << "Section 3 finished " << endl << endl; for(long int *ptr = b, *last = b + 100, val=0; ptr < last; ptr++, val++){ cout << *ptr << endl; } cout << "Section 4 finished " << endl << endl; int index = 0; int var = 10; while(var not_eq b[index]){ cout << "Index " << index << " is not 10" << endl; b[index] = 10000000; index++; } cout << "Index " << index << " is 10" << endl; cout << "Section 5 finished " << endl << endl; for(long int *ptr = b, *last = b + 100, val=0; ptr < last; ptr++, val++){ cout << "Array Values==>" << val << "==>" << *ptr << endl; } cout << endl << endl; cout << "Section 6 finished " << endl << endl; var = 100; index = 0; while(var not_eq index){ time_t sec = time(NULL); b[index] = static_cast(sec) % static_cast(index); index++; } for(long int *ptr = b, *last = b + 100, val=0; ptr < last; ptr++, val++){ cout << "Array Values==>" << val << "==>" << *ptr << endl; } cout << "Section 7 finished " << endl << endl; return 0; }