title: Can we assign integer with negative number to unsigned integer?
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  main()
  {
      int i=-5;
      unsigned int j=i;
      printf("%d",j);
      getch();
  }
  
  O/p
  -----
  -5
  
  #include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  main()
  {
      int i=-5;
      unsigned int j=i;
      printf("%u",j);
      getch();
  }
  
  O/p
  ===
  4255644633
  </code></pre>
  
  <p>Here I am not getting any compilation error .</p>
  
  <p>It is giving -5 when print with the identifier %d and when printing with %u it is printing some garbage value .</p>
  
  <p>The things I want to know  are</p>
  
  <p>1) Why compiler ignores when assigned integer with negative number to unsigned int.</p>
  
  <p>2) How it is converting signed to unsigned ?</p>