Well, as you can read the rules, we won't do the assignment for you. You can provide us tour code and we can help you fix it though.
#include <stdio.h>
int main()
{
int i,j,m,n,o,p;
printf("Enter the no. of row and column of 1st matrix");
scanf("%d,%d",&m,&n);
printf("Enter the no. of row and column of 2nd matrix");
scanf("%d,%d'",&o,&p);
if(m==o && n==p)
{
int a[m][n];
printf("Enter the elements of first matrix\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&a[i][j]);
}
}
int b[m][n];
printf("Enter the second matrix\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&b[i][j]);
}
}
int mat[i][j]=add(a[i][j],b[i][j],m,n);
printf("%d",sum[i][j]);
}
int add(int a[][],b[][],int m,int n)
{
int k,l;
int sum[m][n];
for(k=0;k<m;k++)
{
for(l=0;l<n;l++)
{
sum[k][l]=a[k][l]+b[k][l];
}
printf("\n");
}
return sum;
}