Basically the code below result in in a concatenate string of characters that is placed in "dec". The memory reading from the function which goes through the line of code below is 101E34 which is "dec" should be converted to 163052. How do I convert that string?
for (int j = 0; j <2; j++)
{
char temp[100]= "";
sprintf(temp, "%x", readArray[j]);
if (strlen(temp) < 4)
{
char dec[100] = "";
for (int r = 0; r < 4 - strlen(temp); r++)
{
strcat(dec,"0");
}
strcat(dec, temp);
}
}