Calling strlen(a) is not stopping where you think it should because there's no zero-terminator and garbage memory is spoiling your result. strlen(string) doesn't include the count of a zero-terminator
You should rather do the following (look at the comments)
char *abc()
{
    char *ch;
    char a[7],c[7];
    strncpy(a,"Thanks",strlen("Thanks")); // Watch out, strlen(string) doesn't include null terminator
    a[6] = '\0'; // Prevent garbage from uninitialized memory to pester your ch and strlen(a)
    strncpy(c,"abcdef",strlen("abcdef"));
    c[6] = '\0';
    ch=malloc(50);
    memset(ch,0,50);
    memcpy(ch,&a,strlen(a));
    memcpy(ch+strlen(a),&c,strlen(c)); // No -1 because you want to cut the terminator off
    return ch;
}
int main()
{
    char *a;
    a=abc();
    printf("\n%s\n",a);
    printf("\n%s\n",(a+7));
    fflush(stdout);
    return 0;
}
The above was compiled with C++ but it should pretty much be the same with a few adjustments.
Here's with a memory-like dumping where # means garbage
char *abc()
{
    char *ch;
    char a[7],c[7];
    strncpy(a,"Thanks",strlen("Thanks")); // Watch out, strlen(string) doesn't include null terminator
    // a = "Thanks##################################.."
    a[6] = '\0'; // Prevent garbage from uninitialized memory to pester your ch and strlen(a)
    // a = "Thanks\0############################"
    strncpy(c,"abcdef",strlen("abcdef"));
    // c = "abcdef############################"
    c[6] = '\0';
    // c = "abcdef\0############################"
    ch=malloc(50);
    // ch = "###############################"
    memset(ch,0,50);
    // ch = "000000000000000000000000000000"
    memcpy(ch,&a,strlen(a));
    // ch = "Thanks000000000000000000000000"
    memcpy(ch+strlen(a),&c,strlen(c)); // No -1 because you want to cut the terminator off
    // ch = "Thanksabcdef00000000000000000"
    return ch;
}