第1个回答 2012-01-13
不叫“用指针P指向这个字符串”,而是把输入的字符串copy到你申请好的内存中。
c语言可以用scanf("%s", p);就可以了
第2个回答 2012-01-13
char *p=(char *)malloc((10));
if(p==NULL)
{
printf("erroe!:\n");
exit(0);
}
第3个回答 2012-01-13
char *p=(char *)malloc(sizeof(10));
if(p==NULL)
{
printf("erroe!:\n");
exit(0);
}本回答被网友采纳