title: Using 0 and 1 as false and true in C
body: <p>I am learning C from a book and the author is explaining using 1 for true and 0 for false with while loops. He explained with the following the sample code but I couldn't understand it.</p>
  
  <p><strong>INPUT</strong></p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main(void)
  {
      int n = 3;
  
      while (n)
          printf("%2d is true\n", n--);
      printf("%2d is false\n", n);
  
  
      n = -3;
      while (n)
          printf("%2d is true\n", n++);
      printf("%2d is false\n", n);
  
  
      getchar();
      return 0;
  }
  </code></pre>
  
  <p><strong>OUTPUT</strong></p>
  
  <pre><code>3 is true
  2 is true
  1 is true
  0 is false
  -3 is true
  -2 is true
  -1 is true
  0 is false
  </code></pre>