how to concatenate two strings using dynamic memory allocation concept