title: %02x format specifier for char array
body: <p>I have read about %02x format specifiers but when it comes to an argument of type char array, I am unable to understand the output of the following piece of code:</p>
  
  <pre><code>int main() {
      // your code goes here
      char str[6] = "abcde";
      char t[3];
  
      snprintf(t,3,"%02x",str);
      printf("\t%s",t);
      return 0;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>bf
  </code></pre>
  
  <p>How str is being parsed under this format specifier, is a point of concern. What I feel, the output should have been "ab" (without quotes).</p>