title: Writing char with variables
body: <p>Let us say i have:</p>
  
  <pre><code>printf("Hello, my name is %s\n", name_variable);
  </code></pre>
  
  <p>I want to save the string that <code>printf</code> produces in a char array, so that I can <code>write</code> it somewhere. One solution to do this is to declare a <code>char</code> array and then use <code>strcpy</code> and <code>strcat</code> on it. I was wondering if there is a more elegant way to do so.</p>