getenv + string in c and converting types : <p>I want to add /home/username + "/path.png?5667!http-get:*:image/png:!!!!!" just as in Java. but in C</p>

<p><code>name = malloc(strlen(hm)+strlen("/path.png?5667!http-get:*:image/png:!!!!!") + 2);</code></p>

<pre><code>#include &lt;stdlib.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;string.h&gt;
char *hm;
char *full;
hm = getenv("HOME");
full = malloc(strlen(hm)+strlen("/path.png?5667!http-get:*:image/png:!!!!!") + 2);
printf("name = %s\n",name);
</code></pre>

<p>I expect: <code>/home/username/path.png?5667!http-get:*:image/png:!!!!!"</code></p>
