#include #include int main( int argc, char **argv) { int *iarray; int i; int N; // allocate memory to store the number of elements in the array we passed through command line if ( argc > 1 ){ N = atoi( argv[1] ); } else { N = 100; } iarray = (int*) malloc ( N * sizeof(int) ); // fill in array with interger values from 1 to 100 for ( i = 0 ; i < N ; i++ ){ iarray[i] = i + 1; } // print last element of an array printf(" last element of the array is equal to %d\n", iarray[ N-1 ] ); // free memory free(iarray); return 0; }