title: In C, how to print char[] as escaped hex?
body: <p>So say I have:</p>
  
  <pre><code>char [] = "cat"
  </code></pre>
  
  <p>I want to print it in escaped hex so it looks like:</p>
  
  <pre><code>"\x63\x61\x74"
  </code></pre>
  
  <p>Is there a way to do this without parsing/constructing a new <code>char[]</code> with the escaped hex?</p>