title: is it safe to subtract between unsigned integers?
body: <p>Following C code displays the result correctly, <code>-1</code>.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  main()
  {
  
      unsigned x = 1;
      unsigned y=x-2;
  
     printf("%d", y );
  
  }
  </code></pre>
  
  <ol>
  <li>But in general, is it always safe to do subtraction involving
  unsigned integers?</li>
  <li><p>The reason I ask the question is that I want to do some conditioning
  as follows:</p>
  
  <pre><code>unsigned x = 1; // x was defined by someone else as unsigned, 
  // which I had better not to change.
  for (int i=-5; i&lt;5; i++){
    if (x+i&lt;0) continue
    f(x+i); // f is a function
  }
  </code></pre>
  
  <p>Is it safe to do so?</p></li>
  <li><p>How are unsigned integers and signed integers different in
  representing integers? Thanks!</p></li>
  </ol>