September 2001
Beginner
970 pages
23h 20m
English
Modify the rain program in Listing 10.7 so that it does the calculations using pointers instead of subscripts. (You still have to declare and initialize the array.)
Write a program that initializes an array of double and then copies the contents of the array into two other arrays. (All three arrays should be declared in the main program.) To make the first copy, use a function with array notation. To make the second copy, use a function with pointer notation and pointer incrementing. Have each function take as arguments, the name of the target array, and the number of elements to be copied. That is, the function calls would look like this, given the following declarations:
double source[5] = {1.1, 2.2, 3.3., 4.4, 5.5}; double ...Read now
Unlock full access