#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
int main()
{
char *s = "golden gold view";
char *d;
d = strdup(s);
if(NULL != d)
{
printf("%s\n",d);
free(d);
}
return 0;
}
~
标签:golden,main,free,char,字符串,strdup,include
来源: https://www.cnblogs.com/hshy/p/16384201.html