Continuously merge one char array into another char array : <p>I want to continuously merge <code>small_buf</code> into <code>big_buffer</code> while I receive the message in chunks. I do not how to do this.</p>

<pre><code>char small_buf[100];
char big_buffer[2048];
ssize_t bytes_r = 0;
while((bytes_r = recv(socket_fd,small_buf,sizeof(small_buf)-1,0)) &gt; 0) {
     small_buf[bytes_r] = '\0';
     // now merge small_buf with big_buffer
}
</code></pre>

<p><code>big_buffer</code> represents the big single message which was received as smaller chunks from <code>recv</code>. How could I merge all <code>small_buf</code> into <code>big_buffer</code>?</p>
