title: Abnormal mathematical operation in C
body: <p>I've found this question somewhere and couldn't understand it. Please help me out with this.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
      int main(){
  
      char x = 250;
  
      int ans = x + !x + ~x + ++x;
  
      printf("%d", ans);
  
  
  }
  </code></pre>
  
  <p>The output comes out to be -6. I don't understand how the compiler performs operation. </p>
  
  <p>Thanks in advance!</p>