title: How to print three bytes in a struct in C
body: <p>I have the following C code:</p>
  
  <pre><code>person-&gt;title
  </code></pre>
  
  <p>The title is a three byte char array. All I want to do is print those three bytes. I can't use the string formatter with printf because there is no null byte.</p>
  
  <p>How can I print this out without having to copy it or add a null byte to it?</p>
  
  <p>Thanks in advance!</p>
  
  <h2>UPDATE</h2>
  
  <p>Turns out it's not an array, just three adjacent bytes. If I try to compile with the code suggested:</p>
  
  <p>person->title[0]</p>
  
  <p>It fails with the error:</p>
  
  <pre><code>test.c:46: error: subscripted value is neither array nor pointer.
  </code></pre>