CS 210 - Fundamentals of Programming I
Spring 2006 - Homework 8
10 points
Out: April 25, 2006
Due: May 2, 2006 (beginning of class, no late work accepted)
Write C++ statements to do the following:
- Declare string pointer variables named strPtr1 and strPtr2.
- Allocate an anonymous string variable, and make strPtr1 point to it.
- Input a string value from the keyboard and store it in the
anonymous variable of Problem 2.
- Display the value of the anonymous variable of Problem 2.
- Cause strPtr2 to point to the anonymous variable of Problem 2.
- Declare a double pointer variable named doublePtr.
- Allow the user to enter n, the number of values to be processed;
then allocate an anonymous array of n double values, and make
doublePtr point to it.
- Fill the anonymous array of Problem 7 with n input values,
entered from the keyboard.
- Compute and display the average of the values in the anonymous
array of Problem 7.
- Deallocate the storage of the anonymous variable of Problem 2
and the anonymous array of Problem 7.
Converted using latex2html on Wed Apr 26 12:06:48 CDT 2006