Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write C statements to print diagonal of a 2D matrix of a given size (marks[5][5]) and also print the sum of diagonal values. [Marks 3]

Write C statements to print diagonal of a 2D matrix of a given size (marks[5][5]) and also print the sum of diagonal values. [Marks 3] For example, given a 2D array of 5x5 2 3 4 4 1 3 1 2 1 1 2 3 0 2 1 2 3 4 5 9 2 3 4 9

The output will be 2 1 0 4 9 Sum is 16Immersive Reader

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions