Follow the instructions for starting C++ and viewing the TryThis17.cpp file, which is contained in either the

Question:

Follow the instructions for starting C++ and viewing the TryThis17.cpp file, which is contained in either the Cpp8\Chap12\TryThis17 Project folder or the Cpp8\Chap12 folder. (Depending on your C++ development tool, you may need to open the project/solution file first.) 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. Save and then run the program.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: