title: How can I print unsigned char as ascii
body: <p>I'm trying to convert unsigned char to ascii text. How can I do it? 
  I have tried this, but it is wrong:</p>
  
  <pre><code>typedef struct mtmheader
  {
    unsigned char objName[20]; 
    unsigned char msgType[2];  
  }mtmheader;
  
  mtmheader h;
  processMTMHeader(datap,&amp;h, endmmsgp );
  printf("Name, type: %s %c\n",(char *) &amp;h.objName,(char *) &amp;h.msgType);
  </code></pre>
  
  <p><strong>EDIT</strong>
  I read stream of unsigned bytes and want to know what how can i print is as ascii text. In printf is only pseudo code, which is wrong.</p>