title: Convert hexadecimal charArray to String
body: <p>I have a serious and irritating problem, please help</p>
  <p><code>mdContext-&gt;digest[i]</code> is an unsigned char Array with hexadecimal values so</p>
  <pre><code>for (i = 0; i &lt; 16; i++)
      printf (&quot;%02x&quot;, mdContext-&gt;digest[i]); 
  </code></pre>
  <p>prints <code>900150983cd24fb0d6963f7d28e17f72</code></p>
  <p>now.... I want to get this value in a char Array, i.e if I do</p>
  <pre><code>printf(&quot;%s&quot;,ArrayConverted);
  </code></pre>
  <p>I want to print the above string... Please help me in doing this</p>
  <p>Things I tried</p>
  <h3>Trial-1</h3>
  <pre><code>unsigned char in[64]=0;
    int tempValue[64];
   
  
    for (i = 0; i &lt; 16; i++){
        sprintf(&amp;tempValue[i],&quot;%02x&quot;, (unsigned char)mdContext-&gt;digest[i]);
            in[i]=(unsigned char)tempValue[i];
    }
    
   printf(&quot;%s\n\n\n&quot;,in);
  </code></pre>
  <p>This prints
  <code>90593d4bd9372e77</code>   But Original content is <code>900150983cd24fb0d6963f7d28e17f72</code></p>
  <p>So it is skipping many characters in between... please help me converting this hexadecimal Char array in to a String</p>