title: Converting a decimal to a hexadecimal number
body: <p>Why we use + 55 for converting decimal to hex num . in this code  we use +48 to convert integer to character . when temp &lt; 10 . But when temp > =10 we use +55 . what does it mean by +55 ?</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main(){
      long int decimalNumber,remainder,quotient;
      int i=1,j,temp;
      char hexadecimalNumber[100];
  
      printf("Enter any decimal number: ");
      scanf("%ld",&amp;decimalNumber);
  
      quotient = decimalNumber;
  
      while(quotient!=0){
           temp = quotient % 16;
  
        //To convert integer into character
        if( temp &lt; 10)
             temp =temp + 48;
        else
           temp = temp + 55;
  
        hexadecimalNumber[i++]= temp;
        quotient = quotient / 16;
    }
  
      printf("Equivalent hexadecimal value of decimal number %d: ",decimalNumber);
      for(j = i -1 ;j&gt; 0;j--)
        printf("%c",hexadecimalNumber[j]);
  
      return 0;
  }
  </code></pre>