Technicalsymposium.com-Free Email Alerts


Enter Your Email :

Important Note:Login & Check Your Email Inbox and Activate Confirmation Link

Subscribe & Get All Fresher Jobs Information & Study Materials PDF and Projects- Free Download

C Programming Books PDF


C Aptitude Question Papers


Datastructure Programming in C



C Programming & Tech Interview Materials PDF- Free Download

C Program For Matrix addition

void main()

{

int r,c,a[10][10],i,j,m,n,b[10][10],z[10][10];

clrscr();

printf("Enter r and c value:");

scanf("%d%d",&r,&c);

for(i=1;i<=r;i++)

{

for(j=1;j<=c;j++)

{

printf("a[%d][%d]=",i,j);

scanf("%d",&a[i][j]);

}

}

for(m=1;m<=r;m++)

{

for(n=1;n<=c;n++)

{

printf("b[%d][%d]=",m,n);

scanf("%d",&b[m][n]);

}

}

// z[i][j]=0;

for(i=1;i<=r;i++)

{

for(j=1;j<=c;j++)

{

z[i][j]=(a[i][j]+b[i][j]);

}

}

for(i=1;i<=r;i++)

{

for(j=1;j<=c;j++)

{

printf("%d\t",z[i][j]);

}

printf("\n");

}

getch();

}

Download All C Programming & Study Materials PDF