the above codes has one logical error in multiplying 2 matrices......
the correct portion of the codes:
for(i=0;i<r1;i++)
{
for(j=0;j<c2;j++)
{
mult[i][j]=0;
for(k=0;k<r1;k++)
{
....