title: What does i = i&1 mean in C programming language?
body: <p>I got this sample code and I really do not understand how does it work. It is compiled by GCC and there are no errors at all.</p>
  <p>Also, can you please tell me what this piece of code &quot;<em><strong>i = i&amp;1</strong></em>&quot; does? Thank you!</p>
  <pre><code>int main(void){
    int i;
    for (i = 5; i--; i = i&amp;1) {
      puts(&quot;iteration&quot;); 
    }
    printf(&quot;%d\n&quot;,i);
    return 0;
  }
  </code></pre>
  <p>Output of this program is:</p>
  <blockquote>
  <p>iteration</p>
  <p>-1</p>
  </blockquote>