#include <stdio.h>
#include <string.h>
int main()
{
char first[] = "This is the first part of";
char second[] = "the full string, this being the second half\n.";
char buffer[70];
strcpy(buffer,first);
strcat(buffer,second);
puts(buffer);
return 0;
}
It seems that the size of the array buffer
is not large enough to contain the concatenated strings.
Declare it at least like
char first[] = "This is the first part of";
char second[] = "the full string, this being the second half\n.";
char buffer[sizeof( first ) + sizeof( second ) - 1];