title: How does C store negative numbers in signed vs unsigned integers?
body: <p>Here is the example:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      int x=35;
      int y=-35;
      unsigned int z=35;
      unsigned int p=-35;
      signed int q=-35;
      printf("Int(35d)=%d\n\
  Int(-35d)=%d\n\
  UInt(35u)=%u\n\
  UInt(-35u)=%u\n\
  UInt(-35d)=%d\n\
  SInt(-35u)=%u\n",x,y,z,p,p,q);
  
      return 0;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Int(35d)=35
  Int(-35d)=-35
  UInt(35u)=35
  UInt(-35u)=4294967261
  UInt(-35d)=-35
  SInt(-35u)=4294967261
  </code></pre>
  
  <p>Does it really matter if I declare the value as signed or unsigned int? Because, C actually only cares about how I read the value from memory. Please help me understand this and I hope you prove me wrong.</p>