We need to check whether the given matrix is an identity matrix or not using C programming language.

Identity Matrix is a square matrix in which elements in the left diagonal are 1 and all other elements are 0.

Identity Matrix

Check Identity Matrix in C


C Program to check Identity Matrix

Output of program in C

In the program we have used a 2D array to represent matrix and for loops to loop through the matrix elements. If you are facing any problem then comment.

Leave a Reply