Home / Expert Answers / Computer Science / for-the-following-4x4-2-dimensional-array-answer-the-following-nbsp-questions-by-writing-a-singl-pa251

(Solved): For the following 4x4 (2-dimensional array), answer the following  questions by writing a singl ...



For the following 4x4 (2-dimensional array), answer the following  questions by writing a single C++ program for all questions. You may create a new  function for each point and put them in one C++ file.  

2
33
4
3
44
3
12
00w
56
7
8
86
5
2
4
21
Yellow highlighted line called primary diagonal
Green highlighted line called seconda

 

  1. Find the maximum value in the primary diagonal of the array

  2. Find the minimum value in the secondary diagonal of the array

  3. Change the values ABOVE the primary diagonal to be all ZEROs

  4. Change the values BELOW the primary diagonal to be all ZEROs

  5. Swap the values of the first column with the values of the third column

  6. Swap the values of the second row with the values of the fourth row

2 33 4 3 44 3 12 00w 56 7 8 86 5 2 4 21 Yellow highlighted line called primary diagonal Green highlighted line called secondary diagonal


We have an Answer from Expert

View Expert Answer

Expert Answer


ANSWER: Program: #include using namespace std; void display(int a[4][4]) { for(int i=0;i<4;i++) { for(int j=0;j<4;j++) cout<
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe