#include <stdio.h> #include <string.h> int main() { const char* s1="abc"; const char* s2="1234"; char str[strlen (s1) + strlen (s2) + 1]; strcpy (str, s1); strcat (str, s2); puts(str); return 0; } $ gcc -std=c99 -Wall -Werror ./tst.c -o tst && ./tst abc1234