title: How to check if all values in bool array are true?
body: <p>In <strong>C</strong>,
  what is the best and simplest way to check if all values in a bool table are true?
  I tried something like this but it doesn't work</p>
  
  <pre><code>for(i = 0; i &lt; value; i++){
              if(bool_table[i] == 0)
                  table_true = 0;
              else
                  table_true = 1;
      }
  </code></pre>
  
  <p>The problem with this code is that sometimes if the first value is true then it will set <code>table_true = 1</code></p>