title: Print all elements of an hex array in one line
body: <p>I have an array in C <code>char arr[100]</code>, each element of which may contain an arbitrary hex value (even 0). I want to somehow be able to print this array in one line, for example:</p>
  
  <pre><code>arr[0] = 0x11
  arr[1] = 0x00
  ...
  arr[99] = 0x22
  </code></pre>
  
  <p>The output should be:</p>
  
  <pre><code>0x11 0x00 ..... 0x22
  </code></pre>
  
  <p>If I use a <code>printf()</code> with <code>%s</code>, it will stop at 0. I don't want to use a <code>for</code> loop to print each character one by one using <code>%x</code>. I have constraint of which API I can use because of the system I am working on. It does not allow <code>printf()</code>. It has a function <code>print()</code> which adds a new line after every print, but accepts format strings like <code>%x, %s, %d</code> etc. like <code>printf()</code>.</p>
  
  <p>How can the requirement be achieved ?</p>