Please i need it ASAP i will give you thumbs up Thank you Q3: Modify the code to print the output . // Initializing multidimensional arrays. #include using std::cout; using std::endl; void...







Please i need it ASAP i will give you thumbs up Thank you



Q3: Modify the code to print the output .


// Initializing multidimensional arrays.

#include

using std::cout;

using std::endl;

void printArray( int [][ 3 ] );

int main()

{

int array1[ 2 ][ 3 ] = { { 1, 2, 3 }, { 4, 5, 6 } };

int array2[ 2 ][ 3 ] = { 1, 2, 3, 4, 5 };









int array3[ 2 ][ 3 ] = { { 1, 2 }, { 4 } };

cout < "values="" in="" array1="" by="" row="" are:"=""><>

printArray( array1 );

cout < "values="" in="" array2="" by="" row="" are:"=""><>

printArray( array2 );

cout < "values="" in="" array3="" by="" row="" are:"=""><>

printArray( array3 );

return 0; // indicates successful termination

} // end main

// Complete your code to print the output using function called (printArray)




Output:

Values in array1 by row are:

1 2 3

4 5 6

Values in array2 by row are:

1 2 3

4 5 0

Values in array3 by row are:

1 2 0

4 0 0






Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here