title: C string interpolation
body: <p>I'm building simple http status checker in C. I've got the network part done, but I'm having trouble with string manipulation. Here how it works:</p>
  
  <pre><code>$ ./client http://domain.com/path.html#anchor
  200
  </code></pre>
  
  <p>This utility simply outputs the status of given page on the command line. I need to parse the given string into hostname and request path. I've also built a "template" string with this define:</p>
  
  <pre><code>#define HTTP_GET_MSG "GET %s HTTP/1.1\nUser-Agent: my-agent-0.01\nHost: %s\n\n"
  </code></pre>
  
  <p>I'd like to know how should I approach the interpolation of parsed url (host and path) into this defined string before <code>send()</code>ing it to the socket?</p>