title: Exclamation mark in C array (identity matrix)
body: <p>I know there is a thread about explanation of <code>!</code> in C, but I did not understand it fully so here we go. From my understanding <code>number!</code> will return 0 for a non-zero number and 1 for 0. I saw a few code online and to identify if the matrix is an identity matrix people used something along the lines of:</p>
  
  <pre><code>for (i = 0; i &lt; row; i++)
  {
      for (j = 0; j &lt; column; j++)
      {
          if (a[i][j] != 1 &amp;&amp; a[j][i] != 0)
          {
              flag = 0;
              break;
          }
      }
  }
  if (flag == 1 )
      printf("It is identity matrix \n");
  else
      printf("It is not a identity matrix \n");
  </code></pre>
  
  <p>With user inputted matrix size and values with a being the matrix. My question is how does <code>!</code> mark help in anyway to identify whether it is an identity matrix or not if all it can do is return an input of 1 and 0s. And would there be any other way to identify an identity matrix without the use of?</p>