title: unsigned long(u32_t) conversion to string array
body: <p>in my quest( still starting :) ) to be better at programming I've stumbled upon something that I just cannot answer. </p>
  
  <p>I was tasked to convert binary/hex data (in an array) to string array. So far I've only managed to convert and print the "MSB"s of the hex data. </p>
  
  <p>Here is my current code. Constructive criticism is highly appreciated :) </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  int main()
  {
      int i = 0;  
  
      unsigned long rawdata[] ={0x60,0x100,'\0'};
  
      char stringForRawdata[250];
  
      char finalString[250];
  
      while(i&lt;2)
      {
          sprintf(stringForRawdata,"%lx",*(rawdata+i));
  
          //sprintf(finalString,"%s",stringForRawdata);
  
          finalString[i] = *(stringForRawdata);
  
          printf("\nfinalString[%d] = %s",i,finalString+i);
  
          printf("\nrawdata = %lx for i = %d\n",*(rawdata+i),i); 
  
          i = i+1;    
  
      }
      printf("\n stringForRawdata = %s\n",stringForRawdata);
      printf("\n\n finalString array is %s\n",finalString);
   }
  </code></pre>
  
  <p>input is the <code>unsigned long rawdata[] ={0x60,0x100,'\0'};</code></p>
  
  <p>expected output is a string array <code>{60,100,\0}</code> or <code>{0x60,0x100,\0}</code></p>
  
  <p>the problem is that I can only get the leftmost digit to my string array. </p>