title: Converting unsigned char (array) to unsigned int (array)
body: <p>I want to make a function that converts unsigned char to unsigned int and store it into an array. However, this ends up with an error that says </p>
  
  <blockquote>
    <p>passing argument 1 of 'sprintf' from incompatible pointer type.</p>
  </blockquote>
  
  <pre><code>int main(void) {
      unsigned char key[16] = "1234567812345678";
      phex(key, 16); //store into an array here
  }
  
  uint64_t* phex(unsigned char* string, long len)
  {
      uint64_t hex[len];
      int count = 0;
  
      for(int i = 0; i &lt; len; ++i) {
          count = i * 2;
          sprintf(hex + count, "%.2x", string[i]);
      }
  
      for(int i = 0; i &lt; 32; i++)
          printf(hex[i]);
  
      return hex;
  }
  </code></pre>