title: concatenate two integers into a char * in C
body: <p>Having forgotten my C knowledge now, having a really hard time figuring out how to do the following:</p>
  
  <pre><code>int a = 5; //getting value from a function
  int b = 1; //from a function
  </code></pre>
  
  <p>what I want to have is: </p>
  
  <pre><code>char * returnstring = "5:1"; //want to return this
  </code></pre>
  
  <p>I have tried the following but it doesn't work.</p>
  
  <pre><code>    char astr[5], bstr[5];
      sprintf( astr, "%d", a);
      sprintf( bstr, "%d", b);
  
      char finstr[100]; //final string
      strcpy(finstr, astr);
      strcpy(finstr, ":");
      strcpy(finstr, bstr);
  
      printf ("%s", finstr);
  </code></pre>