title: Why is a negative int greater than unsigned int?
body: <pre><code>int main(void) 
  { 
       unsigned int y = 10; 
       int x = – 4; 
       if (x &gt; y) 
          Printf("x is greater");
       else 
          Printf("y is greater"); 
       getch(); 
       return (0); 
  } 
  
  Output: x is greater
  </code></pre>
  
  <p>I thought the output would be y is greater since it is unsigned. What's the reason behind this?</p>