title: Sparse matrix addition condition
body: <p>I was reading code for addition of sparse matrix and came across this condition</p>
  
  <pre><code>if( sp1[0][0] != sp2[0][0] || sp1[0][1] != sp2[0][1] )
  {
      printf("Invalid matrix size ");
      exit(0);
  }
  </code></pre>
  
  <p>Couldn't understand why the number of non-zero rows and columns should be same ?
  Sorry I am a newbie.</p>
  
  <p>The whole code is <a href="http://www.cprograms.in/Array/sparse-matrix-addition.html" rel="nofollow noreferrer">here</a></p>