strcat is inefficient - this code is actuall O(N^2) in the number of strings being appended.

(strcat is also invalid for the reason given aboe)