title: Converting hex to string in C?
body: <p>Hello I am using digi dynamic c. I am trying to convert this in to string</p>
  
  <pre><code>char readingreg[4];
  readingreg[0] = 4a;
  readingreg[1] = aa;
  readingreg[2] = aa;
  readingreg[3] = a0;
  </code></pre>
  
  <p>Currently when I do <code>printf</code> statements it has to be like this:</p>
  
  <pre><code>printf("This is element 0: %x\n", readingreg[0]);
  </code></pre>
  
  <p>But I want this in string so I can use <code>printf</code> statement like this</p>
  
  <pre><code>  printf("This is element 0: %s\n", readingreg[0]);
  </code></pre>
  
  <p>I am essentialy sending the readingreg array over TCP/IP Port, for which I need to have it as string. I cant seem to be able to convert it into string. Thanks for your help.
  Also if someone can tell me how to do each element at a time rather than whole array, that would be fine to since there will only be 4 elements.</p>