title: malloc puts "garbage" values
body: <p>how can i prevent or bypass the garbage valus malloc puts in my variable?
  attached the code and the output!
  thanks!</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "stdlib.h"
  #include &lt;string.h&gt;
  
  int main() {
      char* hour_char = "13";
      char* day_char = "0";
      char* time = malloc(strlen(hour_char)+strlen(day_char)+2);
      time = strcat(time,day_char);
      time = strcat(time,"-");
      time = strcat(time,hour_char);
      printf("%s",time);
      free(time);
  }
  </code></pre>
  
  <p>this is the output i get:</p>
  
  <pre><code>á[┼0-13
  </code></pre>