title: explain in Matrix Multiplication
body: <p>Here is my code for matrix multiplication.</p>
  
  <pre><code>  #include &lt;stdio.h&gt;
    main()
    {
       int a[10][10],b[10][10],c[10][10],m,n,o,i,j,k;
       printf("Enter rows and column for matrix: ");
       scanf("%d%d%d",&amp;m,&amp;n,&amp;o);
       printf("\nEnter elements of matrix 1:\n");
       for(i=0;i&lt;m;i++)
       {
              for(j=0;j&lt;n;j++)
              {
  
                              printf("Enter elements a[%d][%d]: ",i,j);
                      scanf("%d",&amp;a[i][j]);
              }
      }
      printf("\nEnter elements of matrix 2:\n");
      for(i=0;i&lt;n;i++)
      {
              for(j=0;j&lt;o;j++)
              {
                      printf("Enter elements b[%d][%d]: ",i,j);
                      scanf("%d",&amp;b[i][j]);
              }
      }
      for(i=0;i&lt;m;i++)
      {
              for(j=0;j&lt;o;j++)
              {
                      c[i][j]=0;
              }
      }
      for(i=0;i&lt;m;i++)
      {
              for(j=0;j&lt;o;j++)
              {
                      for(k=0; k&lt;n; ++k)
                      {
                              c[i][j]=c[i][j]+a[i][k]*b[k][j];
                      }
              }
      }
      printf("\nOutput Matrix:\n");
      for(i=0;i&lt;m;i++)
      {
              for(j=0;j&lt;o;j++)
              {
                      printf("%d \t\t ",c[i][j]);
              }
              printf("\n\n");
      }
  }
  </code></pre>
  
  <p>My question is in matrix multiplication why we initialize resultant array (<code>c[i][j]</code>) into 0 and then also add that resultant array with multiplication of both matrix i.e. <code>c[i][j] = c[i][j]+a[i][k]*b[k][j]</code>?
  Why we cant directly write <code>c[i][j] = a[i][k]*b[k][j]</code>?</p>