Wrong answer. Those strings don't have enough space allocated to concatenate them (see original post). Each of those strings need to be copied into some buffer that is large enough to hold all the strings at one time.
Oh, when I said result, I was implicitly talking about a new result string, as suggested by the function prototype that I gave. I thought it was obvious but I guess not.