根据题意怎么做呢 求过程和每个过程的含义

(长度在80以内),然后将自身逆置后复制到该串的末尾。请将其补充
例如,s="ABCD", 复制完成后,s="ABCDDCBA”。 输出最终的s中的串

[要求:使用strcpy ()和strcat()函数实现。]
#include <stdio. h>
void main()
{ char s[81], *p, *q;


#include <stdio.h>
#include <string.h>
#include <malloc.h>

void main()
{
    char s[81], *p, *q;
    scanf("%s", s);
    int len = strlen(s);
    for (int i = len - 1; i >= 0; i--)
    {
        p = (char*)malloc(sizeof(char)*2);
        p[0] = s[i];
        p[1] = '\0';
        strcat(s, p);
    }
    printf("%s\n", s);
}

img