Problem

If necessary, create a new project named TryThis17 Project and save it in the Cpp7\Chap1...

If necessary, create a new project named TryThis17 Project and save it in the Cpp7\Chap12 folder. Enter the C++ instructions shown earlier in Figure 12-22 into a source file named TryThis17.cpp. Change the filename in the first comment. Save and then run the program. As mentioned in the chapter, when you pass a two-dimensional array to a function, the first set of square brackets in its corresponding formal parameter can be empty. Remove the number 4 from the first formal parameter in the function prototype and function header. The main function will now need to pass two actual arguments to the displayArray function: the array and the number of rows (regions) in the array. Make the appropriate modifications to the displayArray function prototype, function header, and function call. Also modify the outer loop’s for clause in the displayArray function so it uses the number of rows passed to the function rather than the literal constant 4. (The answers to TRY THIS Exercises are located at the end of the chapter.)

REFEFENCE: FIGURE 12-22

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 12
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT