void setmemory(char **p, int num) { *p=(char *) malloc(num);} void test(void) { ch
void setmemory(char **p, int num)
{ *p=(char *) malloc(num);}
void test(void)
{ char *str=NULL;
getmemory(&str,100);
strcpy(str,"hello");
printf(str);
}
运行test函数有什么结果?()
请帮忙给出正确答案和分析,谢谢!