C Program to find Sum of two 2D Arrays

Notes:

C Program to find Sum of Two 2D Arrays:

Example Code:

int a[2][2] = {{1,2},{3,4}};
int b[2][2] = {{4,3},{2,1}};
int c[2][2] = {{0,0},{0,0}};
int row=0;
int col=0;

for(row=0; row<2; row++)
{
for(col=0; col<2; col++)
{
c[row][col] = a[row][col] + b[row][col];
printf("%d ",c[row][col]);
}
printf("\n");
}