Răspuns:
int main()
{
char* text1 = nullptr;
char* text2 = nullptr;
const int size = 4;
text1 = new char[size + 1];
text2 = new char[size + 1];
strcpy(text1, "test");
strcpy(text2, "para");
strcat(text1, text2);
std::cout << "Rezultatul concatenarii este: " << text1 << std::endl;
delete[] text1;
delete[] text2;
text1 = nullptr;
text2 = nullptr;
}
Explicație: