日本弓背:结果分析............

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 03:00:18
void GetMemory(char *p)
{
p = (char *)malloc(100);
}
void Test(void)
{
char *str = NULL;
GetMemory(str);
strcpy(str, "hello world");
printf(str);
}
请问运行Test 函数会有什么样的结果?
程序无法运行,大家可以试一下...

hello world

100个字符长度 hello world后面是乱码