title: Bitwise complement operator
body: <p>Can you guys please explain the below program</p>
  
  <pre><code>int main() 
  {   
   int max = ~0; 
   printf("%d\n",max);    
   return 0; 
  }
  </code></pre>
  
  <p>AFAIK ~ will flip the bits. In this case i.e ~0 will set all the bits into 1. So max variable should contain MAX value but I am getting o/p as -1. So can anyone here please tell me why I am getting o/p as -1.</p>