title: How do I use strdup?
body: <p>I am calling <code>strdup</code> and have to allocate space for the variable before calling <code>strdup</code>.</p>
  
  <pre><code>char *variable;
  variable = (char*) malloc(sizeof(char*));
  variable = strdup(word);
  </code></pre>
  
  <p>Am I doing this right? Or is there something wrong here?</p>