69,371
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<memory.h>
int main()
{
char *p1="name";
char *p2,*q;
p2=(char*)malloc(20);
memset (p2, 0, 20);
q = p2;
while(*p2++ = *p1++);
printf("%sn",q);
free(q);
return 0;
}