#include #include #include char * buffer; const char const * hello = "hello, "; const char const * world = "world!"; int mystrlen( const char const * s ) { // measure length of string s int len = 0; while (s[len] != '\0') len ++; return len; } int main() { buffer = malloc( mystrlen(hello) + mystrlen(world) + 1 ); strcpy(buffer,hello); strcat(buffer,world); puts(buffer); /* output the accumulated text */ return 0; }