snprintf 函数拼接
和malloc
#include <stdio.h>
#include <stdlib.h>
int main()
{
/* Write C code in this online editor and run it. */
printf(“Hello, World! \n”);
int ab = 0;
char * a = malloc(20);
ab = snprintf(a,20,"aaaaa");
printf("%d\r\n",ab);
printf("%s\r\n",a);
//ab+=snprintf(a+ab,20,"ccc");
//ab+=snprintf(a+1,20,"ccc");
ab=snprintf(a+5,20,"ccc");
printf("%d\r\n",ab);
printf("%s\r\n",a);
return 0;
}