title: decrement prefix as condition in c while loop
body: <p>Concerning the following usage, i'm confused how --i evaluates to true and what determines when the loop exits:</p>
  
  <pre><code>while (--i) {
      k = p[i];
      p[i] = p[j = random() % B];
      p[j] = k;
  }
  </code></pre>
  
  <p>if as I understand it the -- prefix is decrementing the value of i before it begins the loop, are we then evaluating true=value > 1 and false=0 and thus the loop exits when the value reaches 0? Perhaps I've answered my own question, but if anyone could enlighten me on this. Also, how would this loop behave if the decrement operator was a suffix?</p>