PROBLEM M5B-3: Write a complete program (Filename : ARRAY_M5B_3 ) that will Two-Dimensional array A[5][5] with the first 25 numbers, then print the following : a.) the content of the original array b.) the content of the array with the elements of the 2d row and 4th row interchang c.) the content of the array with the elements of the 3rd col and 5t col interchanged d.) the content of the array with the 2 diagonal elements interchanged. SAMPLE OUTPUT : OUTPUT NO. 1 :ORIGINAL ARRAY ELEMENTS 1. 2 4 8. 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <----- OUTPUT NO.2 : INTERCHANGE ROW 2 WITH ROW 4 ELEMENTS - -- --> 1 2 3 4 5 16 17 18 19 20 11 12 13 14 15 7 8. 10 21 22 23 24 25 <------- OUTPUT NO.3: INTERCHANGE COL 3 WITH COL 5 ELEMENTS - 1 2 4 3. 6 7 10 11 12 15 14 13 16 17 20 19 18 21 22 25 24 23 ---- OUTPUT NO. 4: INTERCHANGE THE DIAGONAL ELEMENTS -----> 2 3 9. 8 7 10 11 12 13 14 15 16 19 18 17 20 25 22 23 24 21 3. 6. 6.
PROBLEM M5B-3: Write a complete program (Filename : ARRAY_M5B_3 ) that will Two-Dimensional array A[5][5] with the first 25 numbers, then print the following : a.) the content of the original array b.) the content of the array with the elements of the 2d row and 4th row interchang c.) the content of the array with the elements of the 3rd col and 5t col interchanged d.) the content of the array with the 2 diagonal elements interchanged. SAMPLE OUTPUT : OUTPUT NO. 1 :ORIGINAL ARRAY ELEMENTS 1. 2 4 8. 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <----- OUTPUT NO.2 : INTERCHANGE ROW 2 WITH ROW 4 ELEMENTS - -- --> 1 2 3 4 5 16 17 18 19 20 11 12 13 14 15 7 8. 10 21 22 23 24 25 <------- OUTPUT NO.3: INTERCHANGE COL 3 WITH COL 5 ELEMENTS - 1 2 4 3. 6 7 10 11 12 15 14 13 16 17 20 19 18 21 22 25 24 23 ---- OUTPUT NO. 4: INTERCHANGE THE DIAGONAL ELEMENTS -----> 2 3 9. 8 7 10 11 12 13 14 15 16 19 18 17 20 25 22 23 24 21 3. 6. 6.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section: Chapter Questions
Problem 4PP
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning