title: DRYing up string assignment
body: <p>Below is one of my C functiosn:</p>
  
  <pre><code>void test(char * ptr)
  {
      ptr[0] = 'T';
      ptr[1] = 'O';
      ptr[2] = 'P';
      ptr[3] = '\0';
  }
  </code></pre>
  
  <p>Is there a way to shorten this? I've tried</p>
  
  <pre><code>void test(char * ptr)
  {
      ptr[0] = "TOP";
  }
  </code></pre>
  
  <p>but that doesn't work. [Note: I do not have the library function <code>strcpy()</code> or similar.]</p>