-------------------------------- Start Of Program -------------------------------- The following statements describe the data capacities of various primitive C++ data types: sizeof(bool) = 1. // number of bytes which a bool type variable occupies sizeof(char) = 1. // number of bytes which a char type variable occupies sizeof(int) = 4. // number of bytes which an int type variable occupies sizeof(long) = 8. // number of bytes which a long type variable occupies sizeof(float) = 4. // number of bytes which a float type variable occupies sizeof(double) = 8. // number of bytes which a double type variable occupies sizeof(bool *) = 8. // number of bytes which a pointer-to-bool type variable occupies sizeof(char *) = 8. // number of bytes which a pointer-to-char type variable occupies sizeof(int *) = 8. // number of bytes which a pointer-to-int type variable occupies sizeof(long *) = 8. // number of bytes which a pointer-to-long type variable occupies sizeof(float *) = 8. // number of bytes which a pointer-to-float type variable occupies sizeof(double *) = 8. // number of bytes which a pointer-to-double type variable occupies sizeof(bool **) = 8. // number of bytes which a pointer-to-pointer-to-bool type variable occupies sizeof(char **) = 8. // number of bytes which a pointer-to-pointer-to-char type variable occupies sizeof(int **) = 8. // number of bytes which a pointer-to-pointer-to-int type variable occupies sizeof(long **) = 8. // number of bytes which a pointer-to-pointer-to-long type variable occupies sizeof(float **) = 8. // number of bytes which a pointer-to-pointer-to-float type variable occupies sizeof(double **) = 8. // number of bytes which a pointer-to-pointer-to-double type variable occupies -------------------------------- STEP_0: CREATE A DYNAMIC ARRAY WHICH IS NAMED A AND WHICH IS COMPRISED OF S INT TYPE VALUES. -------------------------------- The value which was entered for S is 100. S := 100. // number of consecutive int-sized chunks of memory to allocate to an array such that the memory address of the first element of that array, A[0], is stored in a pointer-to-int type variable named A -------------------------------- // Declare a pointer-to-int type variable named A. int * A; // Allocate S contiguous int-sized chunks of memory and store the memory address of the first int-sized chunk of memory, A[0], inside the pointer-to-int type variable named A. A = new int [S]; -------------------------------- A = 0x5607d37868c0. // memory address of A[0] A[0] = 0. // &A[0] = 0x5607d37868c0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[0]). A[1] = 0. // &A[1] = 0x5607d37868c4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[1]). A[2] = 0. // &A[2] = 0x5607d37868c8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[2]). A[3] = 0. // &A[3] = 0x5607d37868cc. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[3]). A[4] = 0. // &A[4] = 0x5607d37868d0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[4]). A[5] = 0. // &A[5] = 0x5607d37868d4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[5]). A[6] = 0. // &A[6] = 0x5607d37868d8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[6]). A[7] = 0. // &A[7] = 0x5607d37868dc. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[7]). A[8] = 0. // &A[8] = 0x5607d37868e0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[8]). A[9] = 0. // &A[9] = 0x5607d37868e4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[9]). A[10] = 0. // &A[10] = 0x5607d37868e8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[10]). A[11] = 0. // &A[11] = 0x5607d37868ec. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[11]). A[12] = 0. // &A[12] = 0x5607d37868f0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[12]). A[13] = 0. // &A[13] = 0x5607d37868f4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[13]). A[14] = 0. // &A[14] = 0x5607d37868f8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[14]). A[15] = 0. // &A[15] = 0x5607d37868fc. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[15]). A[16] = 0. // &A[16] = 0x5607d3786900. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[16]). A[17] = 0. // &A[17] = 0x5607d3786904. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[17]). A[18] = 0. // &A[18] = 0x5607d3786908. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[18]). A[19] = 0. // &A[19] = 0x5607d378690c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[19]). A[20] = 0. // &A[20] = 0x5607d3786910. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[20]). A[21] = 0. // &A[21] = 0x5607d3786914. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[21]). A[22] = 0. // &A[22] = 0x5607d3786918. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[22]). A[23] = 0. // &A[23] = 0x5607d378691c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[23]). A[24] = 0. // &A[24] = 0x5607d3786920. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[24]). A[25] = 0. // &A[25] = 0x5607d3786924. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[25]). A[26] = 0. // &A[26] = 0x5607d3786928. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[26]). A[27] = 0. // &A[27] = 0x5607d378692c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[27]). A[28] = 0. // &A[28] = 0x5607d3786930. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[28]). A[29] = 0. // &A[29] = 0x5607d3786934. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[29]). A[30] = 0. // &A[30] = 0x5607d3786938. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[30]). A[31] = 0. // &A[31] = 0x5607d378693c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[31]). A[32] = 0. // &A[32] = 0x5607d3786940. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[32]). A[33] = 0. // &A[33] = 0x5607d3786944. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[33]). A[34] = 0. // &A[34] = 0x5607d3786948. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[34]). A[35] = 0. // &A[35] = 0x5607d378694c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[35]). A[36] = 0. // &A[36] = 0x5607d3786950. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[36]). A[37] = 0. // &A[37] = 0x5607d3786954. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[37]). A[38] = 0. // &A[38] = 0x5607d3786958. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[38]). A[39] = 0. // &A[39] = 0x5607d378695c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[39]). A[40] = 0. // &A[40] = 0x5607d3786960. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[40]). A[41] = 0. // &A[41] = 0x5607d3786964. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[41]). A[42] = 0. // &A[42] = 0x5607d3786968. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[42]). A[43] = 0. // &A[43] = 0x5607d378696c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[43]). A[44] = 0. // &A[44] = 0x5607d3786970. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[44]). A[45] = 0. // &A[45] = 0x5607d3786974. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[45]). A[46] = 0. // &A[46] = 0x5607d3786978. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[46]). A[47] = 0. // &A[47] = 0x5607d378697c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[47]). A[48] = 0. // &A[48] = 0x5607d3786980. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[48]). A[49] = 0. // &A[49] = 0x5607d3786984. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[49]). A[50] = 0. // &A[50] = 0x5607d3786988. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[50]). A[51] = 0. // &A[51] = 0x5607d378698c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[51]). A[52] = 0. // &A[52] = 0x5607d3786990. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[52]). A[53] = 0. // &A[53] = 0x5607d3786994. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[53]). A[54] = 0. // &A[54] = 0x5607d3786998. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[54]). A[55] = 0. // &A[55] = 0x5607d378699c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[55]). A[56] = 0. // &A[56] = 0x5607d37869a0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[56]). A[57] = 0. // &A[57] = 0x5607d37869a4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[57]). A[58] = 0. // &A[58] = 0x5607d37869a8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[58]). A[59] = 0. // &A[59] = 0x5607d37869ac. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[59]). A[60] = 0. // &A[60] = 0x5607d37869b0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[60]). A[61] = 0. // &A[61] = 0x5607d37869b4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[61]). A[62] = 0. // &A[62] = 0x5607d37869b8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[62]). A[63] = 0. // &A[63] = 0x5607d37869bc. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[63]). A[64] = 0. // &A[64] = 0x5607d37869c0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[64]). A[65] = 0. // &A[65] = 0x5607d37869c4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[65]). A[66] = 0. // &A[66] = 0x5607d37869c8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[66]). A[67] = 0. // &A[67] = 0x5607d37869cc. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[67]). A[68] = 0. // &A[68] = 0x5607d37869d0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[68]). A[69] = 0. // &A[69] = 0x5607d37869d4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[69]). A[70] = 0. // &A[70] = 0x5607d37869d8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[70]). A[71] = 0. // &A[71] = 0x5607d37869dc. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[71]). A[72] = 0. // &A[72] = 0x5607d37869e0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[72]). A[73] = 0. // &A[73] = 0x5607d37869e4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[73]). A[74] = 0. // &A[74] = 0x5607d37869e8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[74]). A[75] = 0. // &A[75] = 0x5607d37869ec. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[75]). A[76] = 0. // &A[76] = 0x5607d37869f0. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[76]). A[77] = 0. // &A[77] = 0x5607d37869f4. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[77]). A[78] = 0. // &A[78] = 0x5607d37869f8. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[78]). A[79] = 0. // &A[79] = 0x5607d37869fc. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[79]). A[80] = 0. // &A[80] = 0x5607d3786a00. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[80]). A[81] = 0. // &A[81] = 0x5607d3786a04. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[81]). A[82] = 0. // &A[82] = 0x5607d3786a08. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[82]). A[83] = 0. // &A[83] = 0x5607d3786a0c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[83]). A[84] = 0. // &A[84] = 0x5607d3786a10. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[84]). A[85] = 0. // &A[85] = 0x5607d3786a14. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[85]). A[86] = 0. // &A[86] = 0x5607d3786a18. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[86]). A[87] = 0. // &A[87] = 0x5607d3786a1c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[87]). A[88] = 0. // &A[88] = 0x5607d3786a20. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[88]). A[89] = 0. // &A[89] = 0x5607d3786a24. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[89]). A[90] = 0. // &A[90] = 0x5607d3786a28. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[90]). A[91] = 0. // &A[91] = 0x5607d3786a2c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[91]). A[92] = 0. // &A[92] = 0x5607d3786a30. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[92]). A[93] = 0. // &A[93] = 0x5607d3786a34. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[93]). A[94] = 0. // &A[94] = 0x5607d3786a38. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[94]). A[95] = 0. // &A[95] = 0x5607d3786a3c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[95]). A[96] = 0. // &A[96] = 0x5607d3786a40. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[96]). A[97] = 0. // &A[97] = 0x5607d3786a44. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[97]). A[98] = 0. // &A[98] = 0x5607d3786a48. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[98]). A[99] = 0. // &A[99] = 0x5607d3786a4c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to A[99]). -------------------------------- STEP_1: RANDOMLY ASSIGN ONE OF THE FIRST T RANDOM NONNEGATIVE INTEGERS TO EACH ELEMENT OF THE ARRAY NAMED A. -------------------------------- The value which was entered for T is 10. T := 10. // number of unique states which each element of array A can represent -------------------------------- // Seed the pseudo random number generator with the integer number of seconds which have elapsed since the Unix Epoch (i.e. midnight of 01_JANUARY_1970). srand(time(NULL)); // For each element, A[i], of the array named A, set A[i] to a randomly generated integer which is no smaller than 0 and no larger than (T - 1). for (i = 0; i < S; i += 1) A[i] = rand() % T; -------------------------------- A = 0x5607d37868c0. // memory address of A[0] A[0] = 1. // &A[0] = 0x5607d37868c0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[0]). A[1] = 6. // &A[1] = 0x5607d37868c4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[1]). A[2] = 2. // &A[2] = 0x5607d37868c8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[2]). A[3] = 8. // &A[3] = 0x5607d37868cc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[3]). A[4] = 8. // &A[4] = 0x5607d37868d0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[4]). A[5] = 3. // &A[5] = 0x5607d37868d4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[5]). A[6] = 1. // &A[6] = 0x5607d37868d8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[6]). A[7] = 8. // &A[7] = 0x5607d37868dc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[7]). A[8] = 3. // &A[8] = 0x5607d37868e0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[8]). A[9] = 3. // &A[9] = 0x5607d37868e4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[9]). A[10] = 4. // &A[10] = 0x5607d37868e8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[10]). A[11] = 7. // &A[11] = 0x5607d37868ec. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[11]). A[12] = 4. // &A[12] = 0x5607d37868f0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[12]). A[13] = 7. // &A[13] = 0x5607d37868f4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[13]). A[14] = 0. // &A[14] = 0x5607d37868f8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[14]). A[15] = 1. // &A[15] = 0x5607d37868fc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[15]). A[16] = 8. // &A[16] = 0x5607d3786900. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[16]). A[17] = 7. // &A[17] = 0x5607d3786904. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[17]). A[18] = 2. // &A[18] = 0x5607d3786908. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[18]). A[19] = 5. // &A[19] = 0x5607d378690c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[19]). A[20] = 7. // &A[20] = 0x5607d3786910. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[20]). A[21] = 5. // &A[21] = 0x5607d3786914. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[21]). A[22] = 9. // &A[22] = 0x5607d3786918. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[22]). A[23] = 1. // &A[23] = 0x5607d378691c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[23]). A[24] = 8. // &A[24] = 0x5607d3786920. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[24]). A[25] = 0. // &A[25] = 0x5607d3786924. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[25]). A[26] = 0. // &A[26] = 0x5607d3786928. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[26]). A[27] = 9. // &A[27] = 0x5607d378692c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[27]). A[28] = 1. // &A[28] = 0x5607d3786930. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[28]). A[29] = 2. // &A[29] = 0x5607d3786934. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[29]). A[30] = 9. // &A[30] = 0x5607d3786938. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[30]). A[31] = 2. // &A[31] = 0x5607d378693c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[31]). A[32] = 8. // &A[32] = 0x5607d3786940. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[32]). A[33] = 3. // &A[33] = 0x5607d3786944. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[33]). A[34] = 0. // &A[34] = 0x5607d3786948. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[34]). A[35] = 8. // &A[35] = 0x5607d378694c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[35]). A[36] = 7. // &A[36] = 0x5607d3786950. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[36]). A[37] = 1. // &A[37] = 0x5607d3786954. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[37]). A[38] = 7. // &A[38] = 0x5607d3786958. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[38]). A[39] = 2. // &A[39] = 0x5607d378695c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[39]). A[40] = 7. // &A[40] = 0x5607d3786960. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[40]). A[41] = 1. // &A[41] = 0x5607d3786964. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[41]). A[42] = 1. // &A[42] = 0x5607d3786968. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[42]). A[43] = 1. // &A[43] = 0x5607d378696c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[43]). A[44] = 0. // &A[44] = 0x5607d3786970. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[44]). A[45] = 4. // &A[45] = 0x5607d3786974. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[45]). A[46] = 4. // &A[46] = 0x5607d3786978. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[46]). A[47] = 0. // &A[47] = 0x5607d378697c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[47]). A[48] = 1. // &A[48] = 0x5607d3786980. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[48]). A[49] = 6. // &A[49] = 0x5607d3786984. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[49]). A[50] = 5. // &A[50] = 0x5607d3786988. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[50]). A[51] = 0. // &A[51] = 0x5607d378698c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[51]). A[52] = 4. // &A[52] = 0x5607d3786990. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[52]). A[53] = 6. // &A[53] = 0x5607d3786994. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[53]). A[54] = 1. // &A[54] = 0x5607d3786998. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[54]). A[55] = 2. // &A[55] = 0x5607d378699c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[55]). A[56] = 7. // &A[56] = 0x5607d37869a0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[56]). A[57] = 1. // &A[57] = 0x5607d37869a4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[57]). A[58] = 1. // &A[58] = 0x5607d37869a8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[58]). A[59] = 0. // &A[59] = 0x5607d37869ac. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[59]). A[60] = 3. // &A[60] = 0x5607d37869b0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[60]). A[61] = 3. // &A[61] = 0x5607d37869b4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[61]). A[62] = 2. // &A[62] = 0x5607d37869b8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[62]). A[63] = 4. // &A[63] = 0x5607d37869bc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[63]). A[64] = 6. // &A[64] = 0x5607d37869c0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[64]). A[65] = 4. // &A[65] = 0x5607d37869c4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[65]). A[66] = 4. // &A[66] = 0x5607d37869c8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[66]). A[67] = 5. // &A[67] = 0x5607d37869cc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[67]). A[68] = 8. // &A[68] = 0x5607d37869d0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[68]). A[69] = 1. // &A[69] = 0x5607d37869d4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[69]). A[70] = 9. // &A[70] = 0x5607d37869d8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[70]). A[71] = 5. // &A[71] = 0x5607d37869dc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[71]). A[72] = 4. // &A[72] = 0x5607d37869e0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[72]). A[73] = 1. // &A[73] = 0x5607d37869e4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[73]). A[74] = 8. // &A[74] = 0x5607d37869e8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[74]). A[75] = 6. // &A[75] = 0x5607d37869ec. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[75]). A[76] = 7. // &A[76] = 0x5607d37869f0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[76]). A[77] = 2. // &A[77] = 0x5607d37869f4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[77]). A[78] = 6. // &A[78] = 0x5607d37869f8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[78]). A[79] = 0. // &A[79] = 0x5607d37869fc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[79]). A[80] = 1. // &A[80] = 0x5607d3786a00. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[80]). A[81] = 4. // &A[81] = 0x5607d3786a04. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[81]). A[82] = 0. // &A[82] = 0x5607d3786a08. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[82]). A[83] = 7. // &A[83] = 0x5607d3786a0c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[83]). A[84] = 2. // &A[84] = 0x5607d3786a10. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[84]). A[85] = 1. // &A[85] = 0x5607d3786a14. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[85]). A[86] = 9. // &A[86] = 0x5607d3786a18. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[86]). A[87] = 9. // &A[87] = 0x5607d3786a1c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[87]). A[88] = 5. // &A[88] = 0x5607d3786a20. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[88]). A[89] = 2. // &A[89] = 0x5607d3786a24. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[89]). A[90] = 9. // &A[90] = 0x5607d3786a28. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[90]). A[91] = 0. // &A[91] = 0x5607d3786a2c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[91]). A[92] = 5. // &A[92] = 0x5607d3786a30. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[92]). A[93] = 3. // &A[93] = 0x5607d3786a34. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[93]). A[94] = 6. // &A[94] = 0x5607d3786a38. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[94]). A[95] = 2. // &A[95] = 0x5607d3786a3c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[95]). A[96] = 8. // &A[96] = 0x5607d3786a40. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[96]). A[97] = 1. // &A[97] = 0x5607d3786a44. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[97]). A[98] = 7. // &A[98] = 0x5607d3786a48. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[98]). A[99] = 6. // &A[99] = 0x5607d3786a4c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[99]). -------------------------------- STEP_2: SORT THE ELEMENT VALUES OF THE ARRAY NAMED A TO BE IN ASCENDING ORDER. -------------------------------- // Sort the integer values stored in array A to be in ascending order using the Bubble Sort algorithm. bubble_sort(A, S); -------------------------------- A = 0x5607d37868c0. // memory address of A[0] A[0] = 0. // &A[0] = 0x5607d37868c0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[0]). A[1] = 0. // &A[1] = 0x5607d37868c4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[1]). A[2] = 0. // &A[2] = 0x5607d37868c8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[2]). A[3] = 0. // &A[3] = 0x5607d37868cc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[3]). A[4] = 0. // &A[4] = 0x5607d37868d0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[4]). A[5] = 0. // &A[5] = 0x5607d37868d4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[5]). A[6] = 0. // &A[6] = 0x5607d37868d8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[6]). A[7] = 0. // &A[7] = 0x5607d37868dc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[7]). A[8] = 0. // &A[8] = 0x5607d37868e0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[8]). A[9] = 0. // &A[9] = 0x5607d37868e4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[9]). A[10] = 0. // &A[10] = 0x5607d37868e8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[10]). A[11] = 1. // &A[11] = 0x5607d37868ec. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[11]). A[12] = 1. // &A[12] = 0x5607d37868f0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[12]). A[13] = 1. // &A[13] = 0x5607d37868f4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[13]). A[14] = 1. // &A[14] = 0x5607d37868f8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[14]). A[15] = 1. // &A[15] = 0x5607d37868fc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[15]). A[16] = 1. // &A[16] = 0x5607d3786900. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[16]). A[17] = 1. // &A[17] = 0x5607d3786904. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[17]). A[18] = 1. // &A[18] = 0x5607d3786908. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[18]). A[19] = 1. // &A[19] = 0x5607d378690c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[19]). A[20] = 1. // &A[20] = 0x5607d3786910. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[20]). A[21] = 1. // &A[21] = 0x5607d3786914. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[21]). A[22] = 1. // &A[22] = 0x5607d3786918. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[22]). A[23] = 1. // &A[23] = 0x5607d378691c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[23]). A[24] = 1. // &A[24] = 0x5607d3786920. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[24]). A[25] = 1. // &A[25] = 0x5607d3786924. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[25]). A[26] = 1. // &A[26] = 0x5607d3786928. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[26]). A[27] = 1. // &A[27] = 0x5607d378692c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[27]). A[28] = 1. // &A[28] = 0x5607d3786930. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[28]). A[29] = 2. // &A[29] = 0x5607d3786934. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[29]). A[30] = 2. // &A[30] = 0x5607d3786938. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[30]). A[31] = 2. // &A[31] = 0x5607d378693c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[31]). A[32] = 2. // &A[32] = 0x5607d3786940. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[32]). A[33] = 2. // &A[33] = 0x5607d3786944. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[33]). A[34] = 2. // &A[34] = 0x5607d3786948. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[34]). A[35] = 2. // &A[35] = 0x5607d378694c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[35]). A[36] = 2. // &A[36] = 0x5607d3786950. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[36]). A[37] = 2. // &A[37] = 0x5607d3786954. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[37]). A[38] = 2. // &A[38] = 0x5607d3786958. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[38]). A[39] = 2. // &A[39] = 0x5607d378695c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[39]). A[40] = 3. // &A[40] = 0x5607d3786960. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[40]). A[41] = 3. // &A[41] = 0x5607d3786964. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[41]). A[42] = 3. // &A[42] = 0x5607d3786968. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[42]). A[43] = 3. // &A[43] = 0x5607d378696c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[43]). A[44] = 3. // &A[44] = 0x5607d3786970. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[44]). A[45] = 3. // &A[45] = 0x5607d3786974. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[45]). A[46] = 3. // &A[46] = 0x5607d3786978. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[46]). A[47] = 4. // &A[47] = 0x5607d378697c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[47]). A[48] = 4. // &A[48] = 0x5607d3786980. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[48]). A[49] = 4. // &A[49] = 0x5607d3786984. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[49]). A[50] = 4. // &A[50] = 0x5607d3786988. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[50]). A[51] = 4. // &A[51] = 0x5607d378698c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[51]). A[52] = 4. // &A[52] = 0x5607d3786990. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[52]). A[53] = 4. // &A[53] = 0x5607d3786994. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[53]). A[54] = 4. // &A[54] = 0x5607d3786998. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[54]). A[55] = 4. // &A[55] = 0x5607d378699c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[55]). A[56] = 4. // &A[56] = 0x5607d37869a0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[56]). A[57] = 5. // &A[57] = 0x5607d37869a4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[57]). A[58] = 5. // &A[58] = 0x5607d37869a8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[58]). A[59] = 5. // &A[59] = 0x5607d37869ac. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[59]). A[60] = 5. // &A[60] = 0x5607d37869b0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[60]). A[61] = 5. // &A[61] = 0x5607d37869b4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[61]). A[62] = 5. // &A[62] = 0x5607d37869b8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[62]). A[63] = 5. // &A[63] = 0x5607d37869bc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[63]). A[64] = 6. // &A[64] = 0x5607d37869c0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[64]). A[65] = 6. // &A[65] = 0x5607d37869c4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[65]). A[66] = 6. // &A[66] = 0x5607d37869c8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[66]). A[67] = 6. // &A[67] = 0x5607d37869cc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[67]). A[68] = 6. // &A[68] = 0x5607d37869d0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[68]). A[69] = 6. // &A[69] = 0x5607d37869d4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[69]). A[70] = 6. // &A[70] = 0x5607d37869d8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[70]). A[71] = 6. // &A[71] = 0x5607d37869dc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[71]). A[72] = 7. // &A[72] = 0x5607d37869e0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[72]). A[73] = 7. // &A[73] = 0x5607d37869e4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[73]). A[74] = 7. // &A[74] = 0x5607d37869e8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[74]). A[75] = 7. // &A[75] = 0x5607d37869ec. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[75]). A[76] = 7. // &A[76] = 0x5607d37869f0. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[76]). A[77] = 7. // &A[77] = 0x5607d37869f4. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[77]). A[78] = 7. // &A[78] = 0x5607d37869f8. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[78]). A[79] = 7. // &A[79] = 0x5607d37869fc. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[79]). A[80] = 7. // &A[80] = 0x5607d3786a00. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[80]). A[81] = 7. // &A[81] = 0x5607d3786a04. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[81]). A[82] = 7. // &A[82] = 0x5607d3786a08. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[82]). A[83] = 8. // &A[83] = 0x5607d3786a0c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[83]). A[84] = 8. // &A[84] = 0x5607d3786a10. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[84]). A[85] = 8. // &A[85] = 0x5607d3786a14. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[85]). A[86] = 8. // &A[86] = 0x5607d3786a18. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[86]). A[87] = 8. // &A[87] = 0x5607d3786a1c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[87]). A[88] = 8. // &A[88] = 0x5607d3786a20. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[88]). A[89] = 8. // &A[89] = 0x5607d3786a24. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[89]). A[90] = 8. // &A[90] = 0x5607d3786a28. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[90]). A[91] = 8. // &A[91] = 0x5607d3786a2c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[91]). A[92] = 8. // &A[92] = 0x5607d3786a30. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[92]). A[93] = 9. // &A[93] = 0x5607d3786a34. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[93]). A[94] = 9. // &A[94] = 0x5607d3786a38. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[94]). A[95] = 9. // &A[95] = 0x5607d3786a3c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[95]). A[96] = 9. // &A[96] = 0x5607d3786a40. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[96]). A[97] = 9. // &A[97] = 0x5607d3786a44. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[97]). A[98] = 9. // &A[98] = 0x5607d3786a48. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[98]). A[99] = 9. // &A[99] = 0x5607d3786a4c. (memory address of the first memory cell comprising the block of 4 contiguous memory cells allocated to A[99]). -------------------------------- STEP_3: CREATE A DYNAMIC ARRAY WHICH IS NAMED B AND WHICH IS COMPRISED OF T INT TYPE VALUES. -------------------------------- // Declare a pointer-to-int type variable named B. int * B; // Allocate T contiguous int-sized chunks of memory and store the memory address of the first int-sized chunk of memory, B[0], inside the pointer-to-int type variable named B. B = new int [T]; -------------------------------- B = 0x5607d3786a60. // memory address of B[0] B[0] = 0. // &B[0] = 0x5607d3786a60. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[0]). B[1] = 0. // &B[1] = 0x5607d3786a64. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[1]). B[2] = 0. // &B[2] = 0x5607d3786a68. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[2]). B[3] = 0. // &B[3] = 0x5607d3786a6c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[3]). B[4] = 0. // &B[4] = 0x5607d3786a70. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[4]). B[5] = 0. // &B[5] = 0x5607d3786a74. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[5]). B[6] = 0. // &B[6] = 0x5607d3786a78. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[6]). B[7] = 0. // &B[7] = 0x5607d3786a7c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[7]). B[8] = 0. // &B[8] = 0x5607d3786a80. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[8]). B[9] = 0. // &B[9] = 0x5607d3786a84. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[9]). -------------------------------- STEP_4: FOR EACH ELEMENT B[i] OF THE ARRAY NAMED B, STORE THE NUMBER OF TIMES i APPEARS AS AN ELEMENT VALUE IN THE ARRAY NAMED A. -------------------------------- B = 0x5607d3786a60. // memory address of B[0] B[0] = 11. // &B[0] = 0x5607d3786a60. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[0]). B[1] = 18. // &B[1] = 0x5607d3786a64. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[1]). B[2] = 11. // &B[2] = 0x5607d3786a68. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[2]). B[3] = 7. // &B[3] = 0x5607d3786a6c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[3]). B[4] = 10. // &B[4] = 0x5607d3786a70. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[4]). B[5] = 7. // &B[5] = 0x5607d3786a74. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[5]). B[6] = 8. // &B[6] = 0x5607d3786a78. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[6]). B[7] = 11. // &B[7] = 0x5607d3786a7c. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[7]). B[8] = 10. // &B[8] = 0x5607d3786a80. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[8]). B[9] = 7. // &B[9] = 0x5607d3786a84. (memory address of the first byte-sized memory cell comprising the block of 4 contiguous byte-sized memory cells allocated to B[9]). -------------------------------- STEP_5: CREATE A DYNAMIC ARRAY WHICH IS NAMED C AND WHICH IS COMPRISED OF T POINTER-TO-CHAR TYPE VALUES. -------------------------------- // Declare one pointer-to-pointer-to-char type variable. char ** C; // Allocate T contiguous pointer-to-char-sized chunks of memory and store the memory address of the first pointer-to-char-sized chunk of memory, C[0], inside the pointer-to-pointer-to-char type variable named C. C = new char * [T]; // C is a two-dimensional array which depicts a histogram (i.e. bar graph) such the length of the ith row is identical to the value stored in B[i]. for (i = 0; i < T; i += 1) { C[i] = new char [B[i]]; for (k = 0; k < B[i]; k += 1) C[i][k] = 'X'; } -------------------------------- C = 0x5607d3786a90. // memory address of C[0] C[0] = XXXXXXXXXXX. // &C[0] = 0x5607d3786a90. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[0]). C[1] = XXXXXXXXXXXXXXXXXX. // &C[1] = 0x5607d3786a98. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[1]). C[2] = XXXXXXXXXXX. // &C[2] = 0x5607d3786aa0. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[2]). C[3] = XXXXXXX. // &C[3] = 0x5607d3786aa8. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[3]). C[4] = XXXXXXXXXX. // &C[4] = 0x5607d3786ab0. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[4]). C[5] = XXXXXXX. // &C[5] = 0x5607d3786ab8. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[5]). C[6] = XXXXXXXX. // &C[6] = 0x5607d3786ac0. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[6]). C[7] = XXXXXXXXXXX. // &C[7] = 0x5607d3786ac8. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[7]). C[8] = XXXXXXXXXX. // &C[8] = 0x5607d3786ad0. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[8]). C[9] = XXXXXXX. // &C[9] = 0x5607d3786ad8. (memory address of the first byte-sized memory cell comprising the block of 8 contiguous byte-sized memory cells allocated to C[9]). -------------------------------- STEP_6: RELEASE MEMORY WHICH WAS ALLOCATED TO THE DYNAMIC ARRAYS NAMED A, B, AND C. -------------------------------- // De-allocate memory which was assigned to the dynamically-allocated array of S int type values. delete [] A; // Free up S contiguous int-sized chunks of memory which were assigned to the dynamic array named A. De-allocate memory which was assigned to the dynamically-allocated array of T int type values. delete [] B; // Free up T contiguous int-sized chunks of memory which were assigned to the dynamic array named B. // De-allocate memory which was assigned to the dynamically-allocated array of T pointer-to-char type values. for (i = 0; i < T; i += 1) delete [] C[i]; // Free up B[i] char-sized chunks of memory which were assigned to the dynamic array named C[i]. delete [] C; // Free up T contiguous pointer-to-char-sized chunks of memory which were assigned to the dynamic array named C. -------------------------------- End Of Program --------------------------------