well this will do what u want. Had a sample code before. This is just a sample code

Code:
str1 = malloc(sizeof(char) * 10);
    str2 = malloc(sizeof(char) * 10);
    
    strcpy(str1,"hello");
    strcpy(str2,"world");
    
    str1 = realloc( str1 , sizeof(char) * strlen(str2) );
            
    strcat(str1,str2);
dont forget to free the str1 and str2

ssharish2005