I tried this in desperation after strcat() refused to work. I just want to concatenate three strings. Can anyone tell me why this doesn't work? I can see the creation of "10", but not of "11", though there's plenty of room on the disk for both. Moreover, if I ask for a printf of fieldn and strlen(fieldn) for all three fields, I get the right responses. field1[] is more than long enough to handle the job.

Code:
void AssembleData(char field1[], char field2[], char field3[])
{
    int i;
    int startPos;
    int stopPos;

    if (field2[0] != '\0')
    {
        startPos = strlen(field1);
        stopPos = startPos + strlen(field2);

        system("touch /var/log/10\n");

        for (i = startPos; i < stopPos; i++)
        {
            field1[i] = field2[i - startPos];
        }

        system("touch /var/log/11\n");

        if (field3[0] != '\0')
        {
            startPos += strlen(field2);
            stopPos += strlen(field3);

            for (i = startPos; i < stopPos; i++)
            {
                field1[i] = field2[i - startPos];
            }
        }
    }
}