c progamming 2022 Makeup Solution

2) Write a program to check if two matrices are equal or not. #include<stdio.h> int main(){ int a[100][100],b[100][100]; int r1,c1,r2,c2,i,j,flag=0; printf(“enter rows and columns of first and second matrix\n”); scanf(“%d%d%d%d”,&r1,&c1,&r2,&c2); printf(“enter elements of first matrix”); for(i=0;i<r1;i++){ for(j=0;j<c1;j++){ scanf(“%d”,&a[i][j]); } } printf(“enter elements of second matrix”); for(i=0;i<r1;i++){ for(j=0;j<c1;j++){ scanf(“%d”,&b[i][j]); } } if((r1 == r2) && (c1 […]

Continue Reading