How to Convert integer to char array
<pre><code>int x = 1231212;
memcpy(pDVal, &amp;x, 4);
int iDSize = sizeof(double);
int i = 0;
for (; i&lt;iDSize; i++)
{
    char c;
    memcpy(&amp;c, &amp;(pDVal[i]), 1);
    printf("%d|\n", c);
    printf("%x|\n", c);

}
</code></pre>

<p>I used above code segment to print the hex value of each byte of a Integer. But that is not working properly. What is issue here ?</p>
