#include /* Most of the code here violates the C++ standard. It is designed to show you some of the things that can happen when you do the wrong things with stack based memory */ /* Declare some output functions */ void output_values(int*,int,double,int*,int,double); void output_array(int*); int main() { /* Create two arrays and two integer variables, on the stack since they are local variables of the main function */ int array_one[10] = {1,2,3,4,5,6,7,8,9,10}; int variable_one = 1; double double_one = 1.1; int array_two[10] = {2,4,6,8,10,12,14,16,18,20}; int variable_two = 2; double double_two=2.2; /* Output the variables... */ output_values(array_one,variable_one,double_one,array_two,variable_two, double_two); /* Get pointers to the arrays and variables */ int *array_one_pointer = array_one; int *variable_one_pointer = &variable_one; int *array_two_pointer = array_two; int *variable_two_pointer = &variable_two; /* Output the addresses of the arrays and variables */ std::cout<<"Array One Address : "<